-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Passing data example does not work #97
Comments
Hey @abrambailey, thanks for creating an issue. It looks like you maybe need to permit I'm guessing it would be something like this: def user_params
params.require(:user).permit(:fresh, ...)
end |
I was not doing this. Actually, I ended up just passing the data through the path like |
Ah OK 😄 Did you still need to permit the attribute you were passing in? (I'm trying to check whether there's actually a bug in the gem with the example you provided in the first comment) |
No, I didn't ... it worked perfectly without needing to permit using my method. |
If you're trying to update the user, you probably need to make it like this <%= render_async users_path,
method: 'POST',
data: { user: { fresh: 'AF' } },
headers: { 'Content-Type': 'text' } %> |
I had the same problem, where the params started with eg. eg.
|
From your readme:
When I tried this, I get:
=> <ActionController::Parameters {"{:fresh"=>">"AF"}", "controller"=>"pages", "action"=>"sidebar_ads"} permitted: false>
The text was updated successfully, but these errors were encountered: