Named_scope 重构为 rails 4
Named_scope refactoring to rails 4
我有named_scope :business, :conditions => "processing_time_15_minutes is null"
如何重构为 rails4 风格
感谢
给你:
scope :business, -> { where(processing_time_15_minutes: nil) }
scope :business, -> { where(processing_time_15_minutes: nil) }
我有named_scope :business, :conditions => "processing_time_15_minutes is null"
如何重构为 rails4 风格
感谢
给你:
scope :business, -> { where(processing_time_15_minutes: nil) }
scope :business, -> { where(processing_time_15_minutes: nil) }