I've looked through all the related questions but nothing's new for me here.
I have a Project controller with "new" action
class ProjectsController < ApplicationController
def new
@newproject = Project.new
end
end
Project is a simple class, not active record:
class Project
attr_accessor :name, :description
def initialize
@name = ""
@description = ""
end
end
I get the error "undefined method `model_name' for Project:Class"
This is an erb file sample:
<%= form_tag(@newproject) do |f| %>
<%= f.label :name %>:
<%= f.text_field :description %><br />
<% end %>