Hi Petan,

That's clearly not enough code to help you. What are the validations
on you version model?

Besides that it's good practice to not user save! but only save.

ciao, tom

On Jan 30, 10:38 am, Petan Cert <[email protected]>
wrote:
> version.filename = file_name_for_version(version_name)
>    begin
>    version.save!
>    rescue ActiveRecord::RecordInvalid
>   raise "BLAH"
>    end
> end
>
> RecordInvalid was raised by save! because is invalid.
> Does anyone know why? I am uploading an image so it should validate
> fine.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to