We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hi Team,
It seems that in v1 and v1.1, there are no error messages for carrierwave without them being explicitly loaded.
I would have expected the file locale/en.yml to have been loaded with orm/activerecord.rb or validations/active_model.rb by default.
Seems like it was removed in: #1848
To Reproduce:
#Bash rails new foo cd foo echo "gem 'carrierwave', '~> 1.0'" >> Gemfile bundle echo "require 'carrierwave/orm/activerecord'" > config/initializers/carrierwave.rb rails generate uploader Avatar rails generate scaffold user name rails generate migration add_avatar_to_users avatar:string cat <<EOT >> app/models/user.rb class User < ApplicationRecord mount_uploader :avatar, AvatarUploader end EOT cat <<EOT >> app/uploaders/avatar_uploader.rb class AvatarUploader < CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end def extension_whitelist %w(jpg jpeg gif png) end end EOT rake db:migrate rails console
#Rails console u = User.new(avatar: File.open(Rails.root.join('public','favicon.ico'))) #=> #<User id: nil, name: nil, created_at: nil, updated_at: nil, avatar: nil> u.valid? #=> false u.errors #=> #<ActiveModel::Errors:0x007fa940c456a8 @base=#<User id: nil, name: nil, created_at: nil, updated_at: nil, avatar: nil>, @messages={:avatar=>["translation missing: en.errors.messages.extension_whitelist_error"]}, @details={:avatar=>[{:error=>"translation missing: en.errors.messages.extension_whitelist_error"}]}>
The text was updated successfully, but these errors were encountered:
95ce39d
No branches or pull requests
Hi Team,
It seems that in v1 and v1.1, there are no error messages for carrierwave without them being explicitly loaded.
I would have expected the file locale/en.yml to have been loaded with orm/activerecord.rb or validations/active_model.rb by default.
Seems like it was removed in: #1848
To Reproduce:
The text was updated successfully, but these errors were encountered: