You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, I am getting NameError - undefined local variable or method view_context when trying to use Filterrific in a controller inheriting from ActionController::API.
where the helpers method calls view_context which is undefined because its not available for ActionController::API. I think it makes sense.
For now, I can set sanitize_param to false and sanitize the params myself. I just want to make sure its an actual issue and not just something occurring only on my end because of some misconfiguration.
Thank you for the help and the gem!
The text was updated successfully, but these errors were encountered:
Rails version: 6.0.3.6
Filterrific version: 5.2.1
As the title says, I am getting NameError - undefined local variable or method
view_context
when trying to use Filterrific in a controller inheriting fromActionController::API
.I have traced down the problem to
filterrific/lib/filterrific/action_controller_extension.rb
Lines 101 to 103 in 312d071
where the helpers method calls
view_context
which is undefined because its not available forActionController::API
. I think it makes sense.For now, I can set
sanitize_param
to false and sanitize the params myself. I just want to make sure its an actual issue and not just something occurring only on my end because of some misconfiguration.Thank you for the help and the gem!
The text was updated successfully, but these errors were encountered: