Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create
- @state = State.new(params[:state])
- respond_to do |format|
- if @state.save
- flash[:notice] = 'State was successfully created.'
- format.html { redirect_to(@state) }
- format.xml { render :xml => @state, :status => :created, :location => @state }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @state.errors, :status => :unprocessable_entity }
- end
- end
- end
Add Comment
Please, Sign In to add comment