responds_to_parent in rails 3
How I will use responds开发者_如何学Go_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?
Use https://github.com/itkin/respond_to_parent
Here is implementation for rails ~> 3.2 https://github.com/Gonzih/respond_to_parent
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
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
rails 3.0 support is fixed in version 1.1.0, not sure about 3.1+
精彩评论