3

How I will use responds_to_parent plug in rails 3. I had used it in rails 2.3.5. At that time there was no errors. But when I shifted to rails 3 its showing the following error

undefined local variable or method `erase_redirect_results'.

How to solve this issue?

5 Answers 5

3

Use https://github.com/itkin/respond_to_parent

1
  • This won't work in Rails 3.1 because ActionView::Helpers::PrototypeHelper has been removed, as @OlivierGrimard says in another comment. You can get it back with the prototype-rails gem, but since Rails 3.1 comes with jquery as the default, using both can cause conflicts.
    – dekeguard
    Nov 29, 2012 at 20:43
3

Here is implementation for rails ~> 3.2 https://github.com/Gonzih/respond_to_parent

1
  • 1
    Works for me on Rails 3.2.12.
    – mpoisot
    Feb 20, 2013 at 22:19
2

In Rails 3.1 'responds_to_parents' doesn't works because it use the library 'PrototypeHelper' and this library has been removed in 3.1.
http://apidock.com/rails/ActionView/Helpers/PrototypeHelper

In rails >3.0, you can always replace 'responds_to_parent' by 'remotipart'.
os.alfajango.com/remotipart/
https://github.com/JangoSteve/remotipart

1

Like report on his issue tracker : http://github.com/markcatley/responds_to_parent/issues#issue/1

This plugin is not Rails 3 compatible.

You have 4 choices :

  • Downgrade to rails 2 and still using this plugin
  • Hack this plugin to made it compatible to Rails 3
  • Wait this plugin to be compatible to Rails 3
  • Unsused this plugin
-1

rails 3.0 support is fixed in version 1.1.0, not sure about 3.1+

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.