Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Andris's Profile

GitHub User: andris310

Comments by Andris


For anyone trying to implement this in Rails 4 don't forget to add {:category_ids => []} to params in the products_controller

def product_params
    {:category_ids => []}

And in that case you don't need a hidden field <%= hidden_field_tag "#{f.object_name}[category_ids][]", nil %>
nor params[:product][:category_ids] ||= []


When trying to debug, in ImageWorker method 'perform' product.image.direct_fog_url(with_path: true) is equal to:


Using Rails 4.0.1 Carrierwave_direct solution. Images get uploaded to S3 but I'm geting an errors in the background processing:
"error_message"=>"Validation failed: Image could not download file: 403 Forbidden", "error_class"=>"ActiveRecord::RecordInvalid"

2013-11-14T16:56:09Z 3924 TID-owk35rblw WARN: Validation failed: Image could not download file: 403 Forbidden
2013-11-14T16:56:09Z 3924 TID-owk35rblw WARN: /Users/Andris/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-4.0.1/lib/active_record/validations.rb:57:in `save!'