我开发使用rails4并使用carrierwave上传图像文件。
我将列添加到myModel以上传另一个图像列
class MyModel < ActiveRecord::Base
mount_uploader :image, ImageUploader
ANDROID = {:image => [800, 355]}
IPHONE = {:image => [800, 355]}
THUMBNAIL = {:image => [150, 150]}
mount_uploader :square_image, ImageUploader
ANDROID = {:square_image => [800, 800]}
IPHONE = {:square_image => [800, 800]}
THUMBNAIL = {:square_image => [150, 150]}
end
修改文件后
我的rails项目发出警告信息
warning: already initialized constant MyModel::ANDROID
DEBUG[c0668d68] app/models/my_model.rb:LINE_NUMBER: warning: previous definition of ANDROID was here
我不知道我在做什么..
帮帮我〜。