вот мой контроллер:
class TalentController < ApplicationController
def index
end
def new
@talent = Talent.new
end
def create
@talent.update_attributes!(params)
end
end
вот мое приложение / views / talent / new.html.haml:
= "Create new talent"
= form_for @talent, :url => {:action=>:create, :controller=>"talent"}, :method => :post do |f|
= f.label :First_Name
= f.text_field :first_name
= f.label :Last_Name
= f.text_field :last_name
= f.label :City
= f.text_field :city
= f.label :State
= f.text_field :state
= f.label :Zip_code
= f.text_field :zip_code
= f.submit "Create"
Когда я нажимаю кнопку создания, я получаю эту ошибку.
No route matches [POST] "/talent/new"
вот мои маршруты рейка:
/ {:action=>"index", :controller=>"talent"}
talent_index GET /talent(.:format) {:action=>"index", :controller=>"talent"}
POST /talent(.:format) {:action=>"create", :controller=>"talent"}
new_talent GET /talent/new(.:format) {:action=>"new", :controller=>"talent"}
edit_talent GET /talent/:id/edit(.:format) {:action=>"edit", :controller=>"talent"}
talent GET /talent/:id(.:format) {:action=>"show", :controller=>"talent"}
PUT /talent/:id(.:format) {:action=>"update", :controller=>"talent"}
DELETE /talent/:id(.:format) {:action=>"destroy", :controller=>"talent"}
Что мне здесь не хватало ??