I have RailsAdmin on my Rails project which has Remotipart 1.4.1 as dependency. I have a NameError on every route.
For example, on my root route :
NameError in ApplicationController#home
undefined local variable or method `controller' for #<ApplicationController:0x000056483b5b7690> Did you mean? controller_path
The error comes from the remotipart_submitted? method in the RequestHelper of the gem
module RequestHelper
def remotipart_submitted?
controller && params[:remotipart_submitted] ? true : false # Highlighted line
end
alias :remotipart_requested? :remotipart_submitted?
Possible fix
I manage the error to disappear by editing the method like this :
def remotipart_submitted?
controller ||= nil # Added this line
controller && params[:remotipart_submitted] ? true : false # Highlighted line
end
But I don't know if it breaks the core functionality of Remotipart so if someone is ready to test it ;)
Description
I have RailsAdmin on my Rails project which has Remotipart 1.4.1 as dependency. I have a NameError on every route.
For example, on my root route :
The error comes from the remotipart_submitted? method in the RequestHelper of the gem
Possible fix
I manage the error to disappear by editing the method like this :
But I don't know if it breaks the core functionality of Remotipart so if someone is ready to test it ;)
Tell me if you need more informations !