Im a bit confused about validations and carrierwave. In this issue
regarding validating remote urls
https://github.com/jnicklas/carrierwave/issues/354
trevorturk suggests using a before_validations filter to clean up urls
and add/remove invalid ones. Then you could do a valiates_persence_of
and if there was no value you could give a nice error.
But I dont understand how this could work as carrierwave attempts to
fetch the image as soon as you set the remote_image_url. The
validations will be run later when you do object.save by which time
its too late.
This is also true of the suggested solution mentioned in my first
post. Whilst the code works, its being called AFTER carrierwave
attempts to fetch it which is too late.
Can anyone confirm this is true? Or am I mistaken?
On Feb 12, 3:21 pm, Adam <
adam.akh...@gmail.com> wrote:
> Ive tried to implement the custom validation class as per the wiki
>
>
https://github.com/jnicklas/carrierwave/wiki/How-to%3a-Validate-the-U...