Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6553879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:38:00+00:00 2026-05-25T12:38:00+00:00

I’m having a problem with Rails not POSTing anything in the params to an

  • 0

I’m having a problem with Rails not POSTing anything in the params to an action.
I’m using a singular resource with a nested plural resource which may or may
not be where the problem is coming from (Rails has issues with form_for and singular
resource URLs).

Anyway, I have this in my routes:

resource :event do
    resources :actions, :only => [:create], :controller => "events/actions"
end

The view:

<%= form_for([@event, Action.new], :remote => true) do |f| %>
  <div class="field">
    <%= f.label :team_id %>
    <br />
    <%= f.text_field :team_id %>
  </div>
  <div class="field">
    <%= f.label :message %>
    <br />
    <%= f.text_field :message %>
  </div>
  <div class="field">
    <%= f.label :score %>
    <br />
    <%= f.number_field :score %>
  </div>
  <br />
  <%= f.submit "Update score" %> or <%= link_to "cancel", "#", :id => "cancel" %>
<% end %>

The create action:

def create
    @event = Event.find(params[:event_id])
    @action = @event.actions.create(params[:action])
end

Ok pretty standard no worries there.
But when I get the params from Rails nothing is there. 🙁

Params:

Started POST "/event/actions.4e67f09349ae71090c00000e"
Processing by Events::ActionsController#create as
Parameters: {"utf8"=>"Γ£ô", "authenticity_token"=>"stuff", "commit"=>"Update score"}

Completed 500 Internal Server Error in 31ms

What is going on here?

Edit:

If I remove the “:remote => true” line in my view,
I see that in my params I get one param “:format”
which appears to be the ID of the event.

However, I’m still not getting the action params. 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:38:01+00:00Added an answer on May 25, 2026 at 12:38 pm

    Ideally I’d like to see those event & action models – I suspect that’s where the problem lies. Without seeing those, a few suggestions:

    • Is ‘accepts_nested_attributes_for :action’ set in the event model?

    • Remove any ‘attr_accessible’ line from both models & see if things work. (Keep in mind you need to set accessible attributes for nested forms in the parent model)

    • ‘Action’ seems like an imprudent name for a model. It’s possible rails is overwriting ‘action’ methods with things related to the actual action

    Hope this helps – I’d suggest posting the models if you still can’t find a solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.