Hello, I beg your pardon for this surely stupid problem, but I''m new in RoR world. I created 3 views inheriting ActiveRecord::Base , lets call them a,b,c. a and b are linked by a table (a_b_fk) and the corresponding foreign keys. Now, when I generate the "administration" page by simply calling scaffold_all_models (from Scaffolding Extensions Plugin) everything works fine, but if I had has_and_belongs_to_many :a in b and symmetrically in a, I get an error : compile error /var/www/rails/esoxCMS/vendor/plugins/scaffolding_extensions/lib/scaffolding_extensions.rb:1: syntax error, unexpected kDEF, expecting $end false def _manage_a Could anyone explain me what''s I''m doing wrong? Thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sounds like a question for the Scaffolding Extensions Plugin author(s). On Sep 4, 5:57 pm, Stefano Grioni <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello, > > I beg your pardon for this surely stupid problem, but I''m new in RoR > world. > > I created 3 views inheriting ActiveRecord::Base , lets call them a,b,c. > a and b are linked by a table (a_b_fk) and the corresponding foreign > keys. > Now, when I generate the "administration" page by simply calling > scaffold_all_models (from Scaffolding Extensions Plugin) everything > works fine, but if I had has_and_belongs_to_many :a in b and > symmetrically in a, I get an error : > > compile error > /var/www/rails/esoxCMS/vendor/plugins/scaffolding_extensions/lib/scaffolding_extensions.rb:1: > syntax error, unexpected kDEF, expecting $end > false def _manage_a > > Could anyone explain me what''s I''m doing wrong? > > Thanks in advance > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok thanks, I''ll ask him. I thought I was doing something against "RoR logics" -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stefano Grioni wrote:> Hello, > > I beg your pardon for this surely stupid problem, but I''m new in RoR > world. > > I created 3 views inheriting ActiveRecord::Base , lets call them a,b,c. > a and b are linked by a table (a_b_fk) and the corresponding foreign > keys. > Now, when I generate the "administration" page by simply calling > scaffold_all_models (from Scaffolding Extensions Plugin) everything > works fine, but if I had has_and_belongs_to_many :a in b and > symmetrically in a, I get an error : > > compile error > /var/www/rails/esoxCMS/vendor/plugins/scaffolding_extensions/lib/scaffolding_extensions.rb:1: > syntax error, unexpected kDEF, expecting $end > false def _manage_a > > Could anyone explain me what''s I''m doing wrong? > > Thanks in advanceMost likely the reflection doesn''t exist or it isn''t :has_and_belongs_to_many. See line 1099 of scaffolding_extensions.rb. If I had to guess, you are using: class B has_and_belongs_to_many :a end instead of: class B has_and_belongs_to_many :as end But I wouldn''t know for sure until you paste your model code. Jeremy -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---