supplier menu progress
This commit is contained in:
@@ -8,6 +8,13 @@ class ProductCategory
|
||||
property :full_day, type: :boolean, default: true
|
||||
property :start_from, type: Fixnum, default: 1320 # 22:00
|
||||
property :end_on, type: Fixnum, default: 1380 # 23:00
|
||||
property :active_on_sunday, type: :boolean, default: true
|
||||
property :active_on_monday, type: :boolean, default: true
|
||||
property :active_on_tuesday, type: :boolean, default: true
|
||||
property :active_on_wednesday, type: :boolean, default: true
|
||||
property :active_on_thursday, type: :boolean, default: true
|
||||
property :active_on_friday, type: :boolean, default: true
|
||||
property :active_on_saturday, type: :boolean, default: true
|
||||
|
||||
belongs_to :supplier
|
||||
has_and_belongs_to_many :products, storing_keys: true
|
||||
@@ -40,7 +47,7 @@ class ProductCategory
|
||||
def week_days=(ary)
|
||||
#write_attribute(:week_days, ary.map(&:to_i))
|
||||
typecasted_value = ary.map(&:to_i)
|
||||
#return typecasted_value if @week_days == typecasted_value
|
||||
#return typecasted_value if @week_days == typecasted_value
|
||||
week_days_will_change! unless @skip_dirty_tracking || typecasted_value == week_days
|
||||
@week_days = typecasted_value
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user