class ContactController < ApplicationController
model :contact
scaffold :contact
end
Errors:
model is unknown.
class ContactsController < ApplicationController
def list @contacts = Contact.find_all
end
def show @contact = Contact.find(@params[‘id’])
end
def create @contact = Contact.new(@params[‘contact’])
if @contact.save
flash[‘notice’] = ‘Contact was successfully created.’
redirect_to :action => ‘list’
else
render_action ‘new’
end
end
9) list.rhtml
Your tutorial is 3 and a half years old. Rails has changed
tremendously since then. A lot of that information in that tutorial
doesn’t cover how newer versions of rails do it or just won’t work
anymore.
altered in
class ContactController < ApplicationController
model :contact
scaffold :contact
end
Errors:
model is unknown.
Both the model and scaffold methods were removed
That should get you started. Also from those links, look for other
related links and get to know the community of Rails developers. Find
and read their blogs. There is a ton of really good information out
there, once you know where to start looking.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.