Skip to content

Use react_component in initializers #377

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

Closed
lou opened this issue Oct 21, 2015 · 3 comments
Closed

Use react_component in initializers #377

lou opened this issue Oct 21, 2015 · 3 comments

Comments

@lou
Copy link

lou commented Oct 21, 2015

Hi,
After updating react-rails from version 1.2.0 to 1.3+ I noticed a breaking change.
I use simple_form with custom inputs and in many of these custom inputs declaration I make a call to the react_component helper method.

Below is an example of one of them:

# app/inputs/characters_counter_input.rb
include React::Rails::ViewHelper

class CharactersCounterInput < SimpleForm::Inputs::Base
  def input(wrapper_options)
    ...
    react_component 'CharactersCounterComponent', options
  end
end

Bellow the trace when I call this input on version 1.3.1+

SystemStackError - stack level too deep:
  react-rails (1.3.1) lib/react/rails/view_helper.rb:14:in `react_component'
  ...
  ...
  react-rails (1.3.1) lib/react/rails/view_helper.rb:14:in `react_component'
  app/inputs/characters_counter_input.rb:10:in `input'
  simple_form (3.2.0) lib/simple_form/wrappers/leaf.rb:19:in `call'
  simple_form (3.2.0) lib/simple_form/wrappers/leaf.rb:19:in `render'
  simple_form (3.2.0) lib/simple_form/wrappers/many.rb:28:in `block in render'
  simple_form (3.2.0) lib/simple_form/wrappers/many.rb:26:in `each'
  simple_form (3.2.0) lib/simple_form/wrappers/many.rb:26:in `render'
  simple_form (3.2.0) lib/simple_form/wrappers/root.rb:15:in `render'
  simple_form (3.2.0) lib/simple_form/form_builder.rb:116:in `input'
  enumerize (1.0.0) lib/enumerize/hooks/simple_form.rb:15:in `input_with_enumerize'
  app/views/pro/opportunities/build/description.html.haml:5:in `block in _app_views_pro_opportunities_build_description_html_haml___3950576054892093194_2233196920'
  haml (4.0.7) lib/haml/helpers.rb:368:in `call'
  haml (4.0.7) lib/haml/helpers.rb:368:in `block in capture_haml'
  haml (4.0.7) lib/haml/helpers.rb:608:in `with_haml_buffer'
  haml (4.0.7) lib/haml/helpers.rb:364:in `capture_haml'
  haml (4.0.7) lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:45:in `capture_with_haml'
  actionview (4.2.4) lib/action_view/helpers/rendering_helper.rb:91:in `_layout_for'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:340:in `block in render_partial'
  app/views/pro/opportunities/build/_form.html.haml:31:in `block in _app_views_pro_opportunities_build__form_html_haml___1730769269917758810_2235918140'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `call'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block (2 levels) in form_for_with_haml'
  haml (4.0.7) lib/haml/helpers.rb:278:in `with_tabs'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block in form_for_with_haml'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
  haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:38:in `capture'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
  actionview (4.2.4) lib/action_view/helpers/form_helper.rb:444:in `form_for'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:139:in `form_for_with_haml'
  haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:26:in `block in simple_form_for'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:45:in `with_simple_form_field_error_proc'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:25:in `simple_form_for'
  app/helpers/pro/application_helper.rb:10:in `simple_form_for'
  app/views/pro/opportunities/build/_form.html.haml:29:in `_app_views_pro_opportunities_build__form_html_haml___1730769269917758810_2235918140'
  actionview (4.2.4) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.4) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:143:in `render'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:309:in `render'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:47:in `render_partial'
  actionview (4.2.4) lib/action_view/helpers/rendering_helper.rb:30:in `render'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
  app/views/pro/opportunities/build/description.html.haml:1:in `_app_views_pro_opportunities_build_description_html_haml___3950576054892093194_2233196920'
  actionview (4.2.4) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.4) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:143:in `render'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
  skylight (0.8.1) lib/skylight/probes/action_view.rb:22:in `block in render_with_layout'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  skylight (0.8.1) lib/skylight/probes/action_view.rb:21:in `render_with_layout'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:14:in `render'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:23:in `render'
  actionview (4.2.4) lib/action_view/rendering.rb:100:in `_render_template'
  actionpack (4.2.4) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.2.4) lib/action_view/rendering.rb:83:in `render_to_body'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.2.4) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.4) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/lou/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
  activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:43:in `render'
  meta-tags (2.1.0) lib/meta_tags/controller_helper.rb:26:in `render_with_meta_tags'
  wicked_pdf (0.11.0) lib/wicked_pdf/pdf_helper.rb:23:in `render_with_wicked_pdf'
  wicked (1.2.1) lib/wicked/controller/concerns/render_redirect.rb:29:in `render_step'
  wicked (1.2.1) lib/wicked/controller/concerns/render_redirect.rb:11:in `render_wizard'
  app/controllers/pro/opportunities/build_controller.rb:14:in `show'
  actionpack (4.2.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.2.4) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
  activesupport (4.2.4) lib/active_support/callbacks.rb:313:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
  activesupport (4.2.4) lib/active_support/core_ext/time/zones.rb:48:in `use_zone'
  app/controllers/pro/application_controller.rb:20:in `set_time_zone'
  activesupport (4.2.4) lib/active_support/callbacks.rb:432:in `block in make_lambda'
  activesupport (4.2.4) lib/active_support/callbacks.rb:312:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:312:in `block in halting'
  activesupport (4.2.4) lib/active_support/callbacks.rb:497:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:497:in `block in around'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.4) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.4) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.2.4) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.4) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `call'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:45:in `serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `each'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
  omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/flash.rb:260:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.2.4) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  activerecord (4.2.4) lib/active_record/migration.rb:377:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack-rewrite (1.5.1) lib/rack/rewrite.rb:24:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack-livereload (0.3.16) lib/rack/livereload.rb:23:in `_call'
  rack-livereload (0.3.16) lib/rack/livereload.rb:14:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  rack-attack (4.3.0) lib/rack/attack.rb:104:in `call'
  sentry-raven (0.15.2) lib/raven/integrations/rack.rb:54:in `call'
  railties (4.2.4) lib/rails/engine.rb:518:in `call'
  railties (4.2.4) lib/rails/application.rb:165:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  thin (1.6.4) lib/thin/connection.rb:86:in `block in pre_process'
  thin (1.6.4) lib/thin/connection.rb:84:in `catch'
  thin (1.6.4) lib/thin/connection.rb:84:in `pre_process'
  thin (1.6.4) lib/thin/connection.rb:53:in `process'
  thin (1.6.4) lib/thin/connection.rb:39:in `receive_data'
  eventmachine (1.0.8) lib/eventmachine.rb:193:in `run_machine'
  eventmachine (1.0.8) lib/eventmachine.rb:193:in `run'
  thin (1.6.4) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.4) lib/thin/server.rb:162:in `start'
  rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'
  rack (1.6.4) lib/rack/server.rb:286:in `start'
  railties (4.2.4) lib/rails/commands/server.rb:80:in `start'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:80:in `block in server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `tap'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  railties (4.2.4) lib/rails/commands.rb:17:in `<top (required)>'
  bin/rails:8:in `require'
  bin/rails:8:in `<top (required)>'
  spring (1.4.0) lib/spring/client/rails.rb:28:in `load'
  spring (1.4.0) lib/spring/client/rails.rb:28:in `call'
  spring (1.4.0) lib/spring/client/command.rb:7:in `call'
  spring (1.4.0) lib/spring/client.rb:28:in `run'
  spring (1.4.0) bin/spring:49:in `<top (required)>'
  spring (1.4.0) lib/spring/binstub.rb:11:in `load'
  spring (1.4.0) lib/spring/binstub.rb:11:in `<top (required)>'
  /Users/lou/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  /Users/lou/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  bin/spring:16:in `<top (required)>'
  bin/rails:3:in `load'
  bin/rails:3:in `<main>'

Bellow the trace when I call this input on version 1.3.0

NameError - undefined local variable or method `request' for #<CharactersCounterInput:0x0000010ef37c08>:
  react-rails (1.3.0) lib/react/rails/view_helper.rb:14:in `react_component'
  app/inputs/characters_counter_input.rb:10:in `input'
  simple_form (3.2.0) lib/simple_form/wrappers/leaf.rb:19:in `render'
  simple_form (3.2.0) lib/simple_form/wrappers/many.rb:28:in `block in render'
  simple_form (3.2.0) lib/simple_form/wrappers/many.rb:26:in `render'
  simple_form (3.2.0) lib/simple_form/wrappers/root.rb:15:in `render'
  simple_form (3.2.0) lib/simple_form/form_builder.rb:116:in `input'
  enumerize (1.0.0) lib/enumerize/hooks/simple_form.rb:15:in `input_with_enumerize'
  app/views/pro/opportunities/build/description.html.haml:5:in `block in _app_views_pro_opportunities_build_description_html_haml__2861018367344879624_2273838160'
  haml (4.0.7) lib/haml/helpers.rb:368:in `block in capture_haml'
  haml (4.0.7) lib/haml/helpers.rb:608:in `with_haml_buffer'
  haml (4.0.7) lib/haml/helpers.rb:364:in `capture_haml'
  haml (4.0.7) lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:45:in `capture_with_haml'
  actionview (4.2.4) lib/action_view/helpers/rendering_helper.rb:91:in `_layout_for'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:340:in `block in render_partial'
  app/views/pro/opportunities/build/_form.html.haml:31:in `block in _app_views_pro_opportunities_build__form_html_haml___521131505851671195_2275677780'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block (2 levels) in form_for_with_haml'
  haml (4.0.7) lib/haml/helpers.rb:278:in `with_tabs'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block in form_for_with_haml'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
  haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
  actionview (4.2.4) lib/action_view/helpers/capture_helper.rb:38:in `capture'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
  actionview (4.2.4) lib/action_view/helpers/form_helper.rb:444:in `form_for'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:139:in `form_for_with_haml'
  haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:26:in `block in simple_form_for'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:45:in `with_simple_form_field_error_proc'
  simple_form (3.2.0) lib/simple_form/action_view_extensions/form_helper.rb:25:in `simple_form_for'
  app/helpers/pro/application_helper.rb:10:in `simple_form_for'
  app/views/pro/opportunities/build/_form.html.haml:29:in `_app_views_pro_opportunities_build__form_html_haml___521131505851671195_2275677780'
  actionview (4.2.4) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.4) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:143:in `render'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:309:in `render'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:47:in `render_partial'
  actionview (4.2.4) lib/action_view/helpers/rendering_helper.rb:30:in `render'
  haml (4.0.7) lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
  app/views/pro/opportunities/build/description.html.haml:1:in `_app_views_pro_opportunities_build_description_html_haml__2861018367344879624_2273838160'
  actionview (4.2.4) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.4) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.4) lib/action_view/template.rb:143:in `render'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
  skylight (0.8.1) lib/skylight/probes/action_view.rb:22:in `block in render_with_layout'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  skylight (0.8.1) lib/skylight/probes/action_view.rb:21:in `render_with_layout'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
  actionview (4.2.4) lib/action_view/renderer/template_renderer.rb:14:in `render'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionview (4.2.4) lib/action_view/renderer/renderer.rb:23:in `render'
  actionview (4.2.4) lib/action_view/rendering.rb:100:in `_render_template'
  actionpack (4.2.4) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.2.4) lib/action_view/rendering.rb:83:in `render_to_body'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.2.4) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.4) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/lou/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
  activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:43:in `render'
  meta-tags (2.1.0) lib/meta_tags/controller_helper.rb:26:in `render_with_meta_tags'
  wicked_pdf (0.11.0) lib/wicked_pdf/pdf_helper.rb:23:in `render_with_wicked_pdf'
  wicked (1.2.1) lib/wicked/controller/concerns/render_redirect.rb:29:in `render_step'
  wicked (1.2.1) lib/wicked/controller/concerns/render_redirect.rb:11:in `render_wizard'
  app/controllers/pro/opportunities/build_controller.rb:14:in `show'
  actionpack (4.2.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.2.4) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
  activesupport (4.2.4) lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
  activesupport (4.2.4) lib/active_support/core_ext/time/zones.rb:48:in `use_zone'
  app/controllers/pro/application_controller.rb:20:in `set_time_zone'
  activesupport (4.2.4) lib/active_support/callbacks.rb:432:in `block in make_lambda'
  activesupport (4.2.4) lib/active_support/callbacks.rb:312:in `block in halting'
  activesupport (4.2.4) lib/active_support/callbacks.rb:497:in `block in around'
  activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.4) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.4) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.2.4) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.4) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:45:in `serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
  omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
  react-rails (1.3.0) lib/react/rails/render_middleware.rb:13:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/flash.rb:260:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.2.4) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  activerecord (4.2.4) lib/active_record/migration.rb:377:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack-rewrite (1.5.1) lib/rack/rewrite.rb:24:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack-livereload (0.3.16) lib/rack/livereload.rb:23:in `_call'
  rack-livereload (0.3.16) lib/rack/livereload.rb:14:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  rack-attack (4.3.0) lib/rack/attack.rb:104:in `call'
  sentry-raven (0.15.2) lib/raven/integrations/rack.rb:54:in `call'
  railties (4.2.4) lib/rails/engine.rb:518:in `call'
  railties (4.2.4) lib/rails/application.rb:165:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  thin (1.6.4) lib/thin/connection.rb:86:in `block in pre_process'
  thin (1.6.4) lib/thin/connection.rb:84:in `pre_process'
  thin (1.6.4) lib/thin/connection.rb:53:in `process'
  thin (1.6.4) lib/thin/connection.rb:39:in `receive_data'
  eventmachine (1.0.8) lib/eventmachine.rb:193:in `run'
  thin (1.6.4) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.4) lib/thin/server.rb:162:in `start'
  rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'
  rack (1.6.4) lib/rack/server.rb:286:in `start'
  railties (4.2.4) lib/rails/commands/server.rb:80:in `start'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:80:in `block in server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  railties (4.2.4) lib/rails/commands.rb:17:in `<top (required)>'
  bin/rails:8:in `<top (required)>'
  spring (1.4.0) lib/spring/client/rails.rb:28:in `call'
  spring (1.4.0) lib/spring/client/command.rb:7:in `call'
  spring (1.4.0) lib/spring/client.rb:28:in `run'
  spring (1.4.0) bin/spring:49:in `<top (required)>'
  spring (1.4.0) lib/spring/binstub.rb:11:in `<top (required)>'
  /Users/lou/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  bin/spring:16:in `<top (required)>'
  bin/rails:3:in `<main>'

It used to work very well prior to version 1.3.
Any help would be greatly appreciated, thanks !

@rmosolgo
Copy link
Member

Sorry to hear that this broke for you!

Looking at that trace from 1.3.1, I don't really understand what went infinite. Here's the relevant code:

I don't see where the loop comes from!

Anyways, I've just merged #375 which fixes some other bugs with the view helper. Could you try the master branch of this gem and see if it works for you?

@lou
Copy link
Author

lou commented Oct 21, 2015

I just tried the master branch and ... It's working!
Thanks @rmosolgo for your quick response.
Maybe it's time for a 1.3.2 version 👍

@lou lou closed this as completed Oct 21, 2015
@rmosolgo rmosolgo mentioned this issue Oct 21, 2015
@rmosolgo
Copy link
Member

Shipped in 1.3.3 🎊

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

2 participants