How would I correctly call the create action from a link_to? I'm using REST (map.resources :recipes). Here's the create action:
def create
recipe = Recipe.create(:name => "French fries")
redirect_to recipe
end
For example, I thought something like this might work:
<%= link_to "Create a default recipe", recipe_path, :method => :post %>
I'm not sure if that's a recommended (or even correct) way to do it. Any idea?