Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 4 enum_select wrong number of arguments #67

Open
rchekaluk opened this issue Mar 15, 2014 · 0 comments
Open

Rails 4 enum_select wrong number of arguments #67

rchekaluk opened this issue Mar 15, 2014 · 0 comments

Comments

@rchekaluk
Copy link

Calling enum_select in Rails 4 generates an error similar to the below (see also this similar error:

  wrong number of arguments (4 for 0)
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/enumerated_attribute-0.2.16/lib/enumerated_attribute/rails_helpers.rb:55:in `initialize'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/enumerated_attribute-0.2.16/lib/enumerated_attribute/rails_helpers.rb:55:in `new'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/enumerated_attribute-0.2.16/lib/enumerated_attribute/rails_helpers.rb:55:in `enum_select'
  REDACT/index.html.erb:239:in `block in _REDACT_index_html_erb___2651190996917899348_58176000'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:38:in `capture'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/helpers/form_tag_helper.rb:773:in `form_tag_in_block'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/helpers/form_tag_helper.rb:69:in `form_tag'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/honeypot-captcha-0.0.2/lib/honeypot-captcha/form_tag_helper.rb:7:in `form_tag_with_honeypot'
  REDACT/index.html.erb:148:in `_REDACT_index_html_erb___2651190996917899348_58176000'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/template.rb:143:in `block in render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/template.rb:141:in `render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:17:in `render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/renderer.rb:42:in `render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_view/renderer/renderer.rb:23:in `render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:127:in `_render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/streaming.rb:219:in `_render_template'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:120:in `render_to_body'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:33:in `render_to_body'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/renderers.rb:26:in `render_to_body'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:97:in `render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:16:in `render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /usr/local/rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/core_ext/benchmark.rb:12:in `ms'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.3/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:40:in `render'
  REDACT_controller.rb:497:in `update'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:189:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:643:in `_run__4046615801077557223__process_action__callbacks'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:136:in `process'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:44:in `process'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/test_case.rb:569:in `process'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/test_case.rb:64:in `process'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_controller/test_case.rb:475:in `post'
  REDACT_controller_test.rb:4014:in `block (2 levels) in <class:REDACTControllerTest>'
  /usr/local/rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/testing/assertions.rb:71:in `assert_difference'
  REDACT_controller_test.rb:4013:in `block in <class:REDACTControllerTest>'
rchekaluk pushed a commit to rchekaluk/enumerated_attribute that referenced this issue Mar 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant