As Colin said, you shouldn't be getting the exact same error at the exact 
same place. Would be good to check it out.

Based on the code you posted, you are not using ActiveRecord features in 
Upload model, so do away with it and use ActiveModel instead.
Here's a great Railscast on this 
- http://railscasts.com/episodes/219-active-model

I have modified the code a little bit to use ActiveModel instead of 
ActiveRecord. This should work fine.
Here it is - https://gist.github.com/1039543

There are still some issue with the code with respect to following 
standards. You should rename the index action to be 'new', because that's 
what it is doing. Similarly, change the view file from upload.rhtml to 
new.html.erb
Name of the controller should be plural, so it should be uploads controller.

I am also assuming that you have a route in place in your routes.rb for 
upload, if not, it should have something like this:
resource :upload

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/rSyybUgdcXwJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to