kala-tamin Can't get value params[:user] first request using mongrel_rails start?

Can't get value params[:user] first request using mongrel_rails start?

I get nil from params[:user] in create action of my controller for the first request when I start my mongrel server by using mongrel_rails start. After that for second and third time are ok. In addition, if I start my Mongrel by using script/server, it doesn't have any problems at all. It is different by starting mongrel server between script/server and mongrel_rails start? Have you ever faced this problem?

Here my code in controller:

def create   @user = User.new(params[:user])    respond_to do |format|     if @user.save       flash[:notice] = 'User was successfully created.'       format.html { redirect_to(@user) }       format.xml  { render :xml => @user, :status => :created, :location => @user }     else       format.html { render :action => "new" }       format.xml  { render :xml => @user.errors, :status => :unprocessable_entity }     end   end end 

And I use Poster add-on to test and post in xml format.

Accessing values of elements in RJS


Inconsistent behavior of Time.now in Ruby/Rails app
First thing you want to check is the new action in your controller.

Rails App fails at startup?
Second is the erb file which has your form.

Rails: using ZenTest / autospec to test specs in new directories
I have a feeling the text field tags are not proper.

How to build good documentation with REST API in Rails?
Partial with Multiple Variables
I'd recommend inspecting the params object by:.
ActiveRecord: Cache and automatically update (redundant) attributes - Best Practice
logger.debug params.inspect # Will show up log/development.log puts params.inspect # Will show up in server console 

Capistrano's Failure

89 out of 100 based on 59 user ratings 1109 reviews