README.rdoc in rails_uploads-0.2.5 vs README.rdoc in rails_uploads-0.2.6

- old
+ new

@@ -61,23 +61,26 @@ validates :attr, :attachment_presence => true, :attachment_size => { :in => 0..4.megabytes }, :attachment_content_type => { :in => ['txt'] } end If you want to translate the errores the keys are: errors.messages.attachment_presence - errors.messages.attachment_size_in # :less_than and :greater_than - errors.messages.attachment_size_less_than # :less_than - errors.messages.attachment_size_greater_than # :greater_than + errors.messages.attachment_size_in # :max and :min + errors.messages.attachment_size_less_than # :count + errors.messages.attachment_size_greater_than # :count errors.messages.attachment_content_type # :types In your views: a{ :href => record.file.url } # To get the file url a{ :href => record.image.url } # To get the original image a{ :href => record.image.url(:big) } # To get the a thumb In your forms: = f.file_field :attr +If your file it's optional: + = f.check_box :delete_attr + = FAQ == How can I use a cdn with this plugin? Define a base url in your application.rb: @@ -89,15 +92,15 @@ rake uploads:s3:buckets:create == How can I clean a preset? Use this rake task: - rake uploads:preset:clean MODEL=models PRESETS=first_preset,second_preset + rake uploads:presets:clean MODEL=models PRESETS=first_preset,second_preset == How can I refresh a preset? Use this rake task: - rake uploads:preset:refresh MODEL=models PRESETS=first_preset,second_preset + rake uploads:presets:refresh MODEL=models PRESETS=first_preset,second_preset == How to migrate from versions before 0.1.0? To migrate from versions before 0.1.0 you need to reorganize uploads with this task after define your presets in your application.rb: rake uploads:migrate