This project is archived and is in readonly mode.
cannot pass a range as parameter for render :collection
Reported by Jan Lelis | June 5th, 2010 @ 07:32 PM
Error:
undefined method `size' for 1..5:Range
in:
<%= render :partial => "some_partial", :collection => 1..5 %>
Trace:
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/partials.rb:215:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/partials.rb:321:in `_render_partial'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/rendering.rb:21:in `render'
app/views/entries/edit.html.erb:20:in `_render_template_106069412__615358128_0'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/capture_helper.rb:37:in `capture'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/capture_helper.rb:150:in `with_output_buffer'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/capture_helper.rb:37:in `capture'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/form_helper.rb:530:in `fields_for'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/form_helper.rb:308:in `form_for'
app/views/entries/edit.html.erb:3:in `_render_template_106069412__615358128_0'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/template.rb:46:in `send'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/template.rb:46:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications/instrumenter.rb:18:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `__send__'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/template.rb:44:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/rendering.rb:58:in `_render_template'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications/instrumenter.rb:18:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `__send__'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/rendering.rb:55:in `_render_template'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_view/render/rendering.rb:25:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:113:in `_render_template'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:107:in `render_to_body'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:100:in `render_to_string'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:91:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rendering.rb:17:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/home/jan/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:77:in `cleanup_view_runtime'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:38:in `render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/base.rb:153:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications/instrumenter.rb:18:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `__send__'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/notifications.rb:48:in `instrument'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/instrumentation.rb:28:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:443:in `_run__780865482__process_action__155074602__callbacks'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in `send'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in `_run_process_action_callbacks'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in `send'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rescue.rb:8:in `process_action'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/base.rb:123:in `process'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:39:in `process'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:84:in `dispatch'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:124
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:in `call'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:148:in `call'
rack-mount (0.6.3) lib/rack/mount/code_generation.rb:89:in `recognize'
rack-mount (0.6.3) lib/rack/mount/code_generation.rb:66:in `optimized_each'
rack-mount (0.6.3) lib/rack/mount/code_generation.rb:88:in `recognize'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:139:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:458:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:31:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/query_cache.rb:35:in `cache'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:11:in `cache'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:30:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/methodoverride.rb:24:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/params_parser.rb:19:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/flash.rb:167:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/session/cookie_store.rb:107:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/cookies.rb:202:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:410:in `_run_call_callbacks'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in `send'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/sendfile.rb:105:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/rack/logger.rb:13:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/runtime.rb:17:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/lock.rb:11:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/lock.rb:11:in `synchronize'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/lock.rb:11:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/application.rb:132:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:in `send'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:in `method_missing'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/rack/log_tailer.rb:15:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/content_length.rb:13:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/chunked.rb:15:in `call'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/handler/mongrel.rb:67:in `process'
mongrel (1.1.5) lib/mongrel.rb:159:in `process_client'
mongrel (1.1.5) lib/mongrel.rb:158:in `each'
mongrel (1.1.5) lib/mongrel.rb:158:in `process_client'
mongrel (1.1.5) lib/mongrel.rb:285:in `run'
mongrel (1.1.5) lib/mongrel.rb:285:in `initialize'
mongrel (1.1.5) lib/mongrel.rb:285:in `new'
mongrel (1.1.5) lib/mongrel.rb:285:in `run'
mongrel (1.1.5) lib/mongrel.rb:268:in `initialize'
mongrel (1.1.5) lib/mongrel.rb:268:in `new'
mongrel (1.1.5) lib/mongrel.rb:268:in `run'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/handler/mongrel.rb:38:in `run'
/home/jan/.rvm/gems/ruby-1.8.7-p249/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/server.rb:155:in `start'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/commands/server.rb:62:in `start'
/home/jan/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta3/lib/rails/commands.rb:42
script/rails:9:in `require'
script/rails:9
(1..5).to_a works
Comments and changes to this ticket
-
Santiago Pastorino February 2nd, 2011 @ 04:38 PM
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:38 PM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>