Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用带有设计和回形针的 Rails4 我的图像没有保存在我的数据库中。我越来越
不允许的参数:头像
我attr_accessible :avatar在我的admin/users_controller.rb
attr_accessible :avatar
admin/users_controller.rb
您必须使用允许的参数:
# adjust the fields you need: :avatar, :first_name, :last_name,... User.create(params.permit(:avatar))
见https://github.com/rails/strong_parameters