hi, When i am trying to render the data from the table i am getting the following error
Action Controller: Exception caught You have a nil object when you didn't expect it! The error occurred while evaluating nil.items app/views/categories/_list.rhtml:13:in `_run_erb_47app47views47categories47_list46rhtml' app/views/categories/index.html.erb:9:in `_run_erb_47app47views47categories47index46html46erb' app/controllers/categories_controller.rb:18:in `index' :1:in `initialize' please help me in this On Wed, Nov 12, 2008 at 3:09 PM, Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::. <[EMAIL PROTECTED]> wrote: > > El Tuesday 11 November 2008 10:06:04 Antonio Bardazzi Multicore-Sistemi.com > escribió: > > I'm testing git commit d16b4f3 (mongrel/passenger development/ > > production) > > > > Subform instance has @record already defined and edit_associated line > > 9 never triggers: > > > > @record ||= @column.association.klass.new > > > > So @record.class will be always the @parent_record.class > > > > Where does @record instance come from? > > > > For now I patch with: > > > > [EMAIL PROTECTED] ||= @column.association.klass.new > > if params[:associated_id] > > @record = > > @column.association.klass.find(params[:associated_id]) > > else > > @record = > > @column.association.klass.new > > end > > Sorry, but your patch does the same as code in git (lines 8 and 9): > @record = @column.association.klass.find(params[:associated_id]) if > params[:associated_id] > @record ||= @column.association.klass.new > > > > -- > Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::. > Nicolás Guillén 6, locales 2 y 3. 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 -~----------~----~----~----~------~----~------~--~---
