Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_for :client, :url => clients_url, :html => { :method => :post } do |f| -%>
- <p>Client Name:<br/><%= f.text_field :client_name, :size => 60 %></p>
- <%= submit_tag 'Save' %>
- <% end -%>
- def create
- @client = Client.new(params[:client])
- @client.save!
- flash[:notice] = 'Client saved'
- redirect_to :action => 'index'
- rescue ActiveRecord::RecordInvalid
- render :action => 'new'
- end
- match ':controller(/:action(/:id))(.:format)'
- resources :clients
- Started POST "/clients" for 127.0.0.1 at Wed Sep 12 10:37:31 +0800 2012
- Processing by ClientsController#index as HTML
- Parameters: {"commit"=>"Save", "authenticity_token"=>"fWBMy8fzGo1BHwm5yN/oXClUUfy+pS2R4Z2Hhzu2/20=", "utf8"=>"342234223", "client"=>{"client_name"=>"wefw"}}
- [1m[35mClient Load (0.2ms)[0m SELECT "clients".* FROM "clients"
- Rendered clients/index.html.erb within layouts/application (0.6ms)
- Rendered layouts/_menu.html.erb (0.1ms)
- Completed 200 OK in 14ms (Views: 12.4ms | ActiveRecord: 0.2ms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement