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

  • SEARCH
  • Home
  • 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 8753967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:31:50+00:00 2026-06-13T13:31:50+00:00

I am getting an error Started POST /actions for 127.0.0.1 at 2012-10-29 15:04:01 +0600

  • 0

I am getting an error

Started POST "/actions" for 127.0.0.1 at 2012-10-29 15:04:01 +0600
Processing by ActionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"lfHYF3EQn1/lMReK3alX3NsGa4wSMejC/0fEeoAFYUY=", "commit"=>"Create Action"}
Completed 500 Internal Server Error in 1ms

NoMethodError (undefined method `stringify_keys' for "create":String):
  app/controllers/actions_controller.rb:43:in `new'
  app/controllers/actions_controller.rb:43:in `create'

This code is totally generated by Rails, and i do not understand why it doesnt work

Here is model

class Action < ActiveRecord::Base
  attr_accessible :name, :user_id
end

Here is controller part

# GET /actions/new
# GET /actions/new.json
def new
  @action = Action.new

  respond_to do |format|
    format.html # new.html.erb
    format.json { render json: @action }
  end
end

def create
  @action = Action.new(params[:action]) # here we get an error !

  respond_to do |format|
    if @action.save
      format.html { redirect_to @action, notice: 'Action was successfully created.' }
      format.json { render json: @action, status: :created, location: @action }
    else
      format.html { render action: "new" }
      format.json { render json: @action.errors, status: :unprocessable_entity }
    end
  end
end

And here is the form code

<%= form_for(@action) do |f| %>
  <% if @action.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@action.errors.count, "error") %> prohibited this action from being saved:</h2>

      <ul>
      <% @action.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :user_id %><br />
    <%= f.number_field :user_id %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

When i press post, firebug shows this request parameters

utf8:✓
authenticity_token:lfHYF3EQn1/lMReK3alX3NsGa4wSMejC/0fEeoAFYUY=
action[name]:sdf
action[user_id]:23
commit:Create Action

if i understand correctly this must work and rails must turn action[name] and action[user_id] into hash table and place it into parameters[:action], then Action.new get this hash table as parameter. What is wrong ?

  • 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-06-13T13:31:51+00:00Added an answer on June 13, 2026 at 1:31 pm

    Ah, I know. You have a name clash.

    action is a reserved name. Along with controller, id and maybe others. Use another name for your form.

    When you post to /actions/create, then params[:controller] should be ‘posts’ and params[:action] should be ‘create’. These params are assigned by Rails.

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

Sidebar

Related Questions

I'm trying to follow the rails getting started guide http://guides.rubyonrails.org/getting_started.html to create a blog
Getting this error after updating OmniAuth gem to 1.1: Started GET /users/auth/facebook for 127.0.0.1
I just started getting this error today, seemingly out of nowhere. Any one see
Out of the blue today I started getting this error in Visual Studio 2008
I updated from Grails 2.0 to 2.0.1 and started getting this error. Any ideas
When I'm trying to seed my database, I started getting this error: rake aborted!
I started getting the following error whenever i use SVN in my server: svn:
Suddenly I started getting the following error: Fatal error: Class 'Mongo' not found in
Recently I've switched to Ninject 2.0 release and started getting the following error: Error
I have just started getting a very strange error when using jQueryMobile for my

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.