标签: ruby-on-rails ruby carrierwave
我希望根据对象属性动态设置上传器。
#Something like this in the user.rb mount_uploader :avatar, Avatar2Uploader,:if => Proc.new{|p| p.migrated == false } mount_uploader :avatar, Avatar1Uploader,:if => Proc.new{|p| p.migrated == true }
有没有办法实现这个目标?