GithubHelp home page GithubHelp logo

Comments (6)

nikolalsvk avatar nikolalsvk commented on May 26, 2024 1

Hey @abrambailey, thanks for creating an issue.

It looks like you maybe need to permit fresh as a parameter for your controller action. Are you doing that?

I'm guessing it would be something like this:

def user_params
  params.require(:user).permit(:fresh, ...)
end

from render_async.

nikolalsvk avatar nikolalsvk commented on May 26, 2024 1

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' } %>

from render_async.

nicholaswellens avatar nicholaswellens commented on May 26, 2024 1

I had the same problem, where the params started with eg. "{:fresh"=>">"AF"}". Worked around it by sending in JSON format:

eg.

<%= render_async users_path,
                 method: 'POST',
                 data: { fresh: 'AF' }.to_json,
                 headers: { 'Content-Type': 'application/json' } %>

from render_async.

abrambailey avatar abrambailey commented on May 26, 2024

I was not doing this. Actually, I ended up just passing the data through the path like users_path(fresh: 'AF') in the end. Not sure why I didn't do that to begin with 😆

from render_async.

nikolalsvk avatar nikolalsvk commented on May 26, 2024

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)

from render_async.

abrambailey avatar abrambailey commented on May 26, 2024

No, I didn't ... it worked perfectly without needing to permit using my method.

from render_async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.