Hello All,
Controller code
Hello All,
Controller code
What is the full stack trace?
Is this enough ?
4: <% y = '' %> 5: <% for d in @dates 6: if y.to_s != d.y.to_s
c:/Program Files/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/ lib/active_record/attribute_methods.rb:236:in `method_missing' app/views/public/dates.rhtml:6 app/views/public/dates.rhtml:5:in `each' app/views/public/dates.rhtml:5 c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/renderable.rb:39:in `send' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/renderable.rb:39:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/template.rb:73:in `render_template' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/base.rb:256:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/base.rb:367:in `_render_with_layout' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/base.rb:254:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/base.rb:1174:in `render_for_file' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/base.rb:896:in `render_without_benchmark' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/benchmarking.rb:51:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/ lib/active_support/core_ext/benchmark.rb:8:in `realtime' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/benchmarking.rb:51:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/base.rb:868:in `render_without_benchmark' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/benchmarking.rb:51:in `render' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/ lib/active_support/core_ext/benchmark.rb:8:in `real
in fact the elements in @dates are not real membes of Q, they even have nil value in id. try to use @dates = ActiveRecord::Base.connection.select_values("
4: <% y = '' %> 5: <% for d in @dates 6: if y.to_s != d.y.to_s
also if I rewrite line 6 in the following way it works
6: if y != d['y'].to_s
but it requires to change a lot of code
Regards. Pavel
ActiveRecord::Base.connection.select_all i meant
in fact the elements in @dates are not real membes of Q, they even have nil value in id. try to use @dates = ActiveRecord::Base.connection.select_values("
this function doesn't support :first, :conditions, :joins and etc params
Regards, Pavel