Apparently, record_select (or AS) tries to render a wrong partial. Instead of taking record_select's template, it goes to AS's partial with the same name.
I have solved this problem by renaming file .../record_select/lib/ views/_list.rhtml and also changing references to it in _browse.rhtml and browse.rjs There should be a better way, of course. h_basin wrote: > Hmm...I get a nil object for the expected @records set. Anybody else > experiencing this? I get this even on a fresh Rails project. > > Environment: Rails 2.2.2, latest git pull of both AS and > RecordSelect. > > Stack Trace follows: > ---------------------------------- > > ActionView::TemplateError (You have a nil object when you didn't > expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.empty?) on line #23 of vendor/ > plugins/active_scaffold/frontends/default/views/_list.rhtml: > 20: </tr> > 21: </tbody> > 22: <tbody class="records" id="<%= active_scaffold_tbody_id %>"> > 23: <% if [email protected]? -%> > 24: <%= render :partial => 'list_record', :collection => > @page.items, :locals => { :hidden => false, :dont_show_calculations => > true } %> > 25: <% end -%> > 26: <% if active_scaffold_config.list.columns.any? {|c| > c.calculation?} -%> > > vendor/plugins/active_scaffold/frontends/default/views/_list.rhtml: > 23 > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable_partial.rb:20:in > `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:26:in > `benchmark' > > /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:26:in > `benchmark' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable_partial.rb:19:in > `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in > `render_template' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in > `render_without_active_scaffold' > > vendor/plugins/active_scaffold/lib/extensions/action_view_rendering.rb:61:in > `render' > vendor/plugins/recordselect/lib/record_select/helpers.rb:113:in > `render_record_select' > vendor/plugins/recordselect/lib/views/_browse.rhtml:7 > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `render' [...] > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' > script/server:3 > > Rendered /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/templates/rescues/_trace (112.3ms) > Rendered /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/templates/rescues/_request_and_response (4.5ms) > Rendering /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/templates/rescues/layout.erb (internal_server_error) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
