Ruby on rails ArgumentError:未知键::顺序。在Rails 4.2.6中,有效键是::class_name,:anonymous_class

Ruby on rails ArgumentError:未知键::顺序。在Rails 4.2.6中,有效键是::class_name,:anonymous_class,ruby-on-rails,Ruby On Rails,运行rake db时出现以下错误:迁移: ArgumentError:未知键::顺序。有效键为::class_name, :匿名\u类、:外部\u键、:验证、:自动保存、:表\u名称、, :添加前,:添加后,:删除前,:删除后,:扩展, :主键,:从属,:as,:至,:源,:源类型, :反向的,:计数器缓存,:联接表,:外部类型 这是我遇到错误的模型: class Report < ActiveRecord::Base belongs_to :user has_many :ico

运行rake db时出现以下错误:迁移:

ArgumentError:未知键::顺序。有效键为::class_name, :匿名\u类、:外部\u键、:验证、:自动保存、:表\u名称、, :添加前,:添加后,:删除前,:删除后,:扩展, :主键,:从属,:as,:至,:源,:源类型, :反向的,:计数器缓存,:联接表,:外部类型

这是我遇到错误的模型:

class Report < ActiveRecord::Base

  belongs_to :user
  has_many :icons, :order => 'position_id ASC' #showing error here..
  has_many :photos, :dependent => :destroy

end
类报告“position_id ASC”#在这里显示错误。。
有很多:照片,:相依=>:销毁
结束
请帮忙。

has_many :icons, -> { order('position_id ASC') }
有很多:图标,->{order('position\u id ASC')}}在这里显示错误。