On Viernes, 26 de Junio de 2009 21:44:39 amfeld20 escribió: > I created the database with Rails. > > I also figured out how to fix the create action for recipes - I > deleted the foreign key constraint in postgres, but I still get those > RJS errors when creating or updating recipe objects. Has anyone ever > encountered this before? After clicking "create" or "update," a window > pops up with the RJS error, but clicking "Okay" and returning to the > list shows that the recipe was indeed created or updated.
Which active_scaffold version are you using? I have tried with master branch and I don't get RJS errors after creating or updating. > > On Jun 26, 1:05 pm, "G. Sobrinho" <[email protected]> wrote: > > Do you created the database with Rails or are you using a "legacy" > > database? > > > > 2009/6/25 amfeld20 <[email protected]> > > > > > Hi all, > > > > > > I'm having trouble with the create action. I'm getting this error > > > right after clicking "Create" > > > > > > Request Failed (code 500, Internal Error) > > > > > > After more searching, it seems the record shows this is the problem: > > > > > > PGError: ERROR: insert or update on table "recipes" violates foreign > > > key constraint "recipes_category_fk" > > > DETAIL: Key (id)=(20) is not present in table "categories". > > > > > > (In my models, a recipe belongs_to a category, and a category has_many > > > recipes. A recipe also validates_presence_of a category). > > > > > > Any thoughts on what I should do? > > > > > > Next, with the update action, as I try to change attributes of a > > > recipe, the changes will go through, but not before a window pops up > > > with this error: > > > > > > RJS error: > > > > > > TypeError: $$("#recipes-update-4-form a.cancel").first().link is > > > undefined > > > > > > This one I'm a little less sure where to start looking. Any help > > > would be much appreciated! Thanks! > > > > -- > > Regards, > > > > Gabriel Sobrinho > > E-mail: [email protected] > > Phone: +55 31 8775 8378 > > > > Don't print this e-mail. The nature is thankful and your money also. > > -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
