I know this question been ask before and they said 'models are independent of the controller.' So, following my same code I did for other models I just renamed my working code to fit to my new model. But I'm getting an error undefined method 'userimages_path' Here the code I'm using.
The model is userimage and the controller is uploads.
Controller/uploads_controller.rb
def new
@userimage = Userimage.new
end
Model/userimage.rb is an empty file
Views/uploads/new.html.erb (This line is throwing the error.)
<%= form_for @userimage do |f|%>
In my routes.rb
resources :uploads
I have rake db:migrate several times to make sure I did migrate the database thinking this might be why it can't find the Userimage.
What I have I done wrong/missing here?
Userimagecompared toUserImage?create_table "userimages", force: :cascade do |t| t.text "description" t.string "title" t.datetime "created_at", null: false t.datetime "updated_at", null: false end