undefined method `model_name' for Project:Class
if Project is not an active record subclass, you need these and you can use form_for
class Project
extend ActiveModel::Naming
include ActiveModel::Conversion
def persisted?
false
end
...
end
view:
<%= form_for(@newproject) do |f| %>
<%= f.label :name %>:
<%= f.text_field :description %><br />
<% end %>
class Project < ActiveRecord::Base
just for the record - here is the Railscast for that issue:
http://railscasts.com/episodes/219-active-model