supplier menu progress

This commit is contained in:
2014-11-24 18:20:10 +01:00
parent 148a0a2815
commit 1707f4d19f
37 changed files with 7356 additions and 6046 deletions
+8 -1
View File
@@ -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