I've just executed this:
rails g scaffold Photos name:string description:string
and added paperclip to that model:
rails g paperclip Photo image
and when i go to photos/new
i get this:
undefined method `model_name' for NilClass:Class
What is the problem it may be? There is @photo = Photo.new
in controller, and form_for(@photo)
in new.html.erb
Thank you for ahy help!