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
+1 -4
View File
@@ -18,6 +18,7 @@ class Supplier
property :city
property :country, default: 'Netherlands'
property :facebook_promotion_url
property :week_starts_on_monday, type: :boolean, default: true
#LOCATION
property :lat, type: Float #, default: 52.08062426379751
@@ -148,10 +149,6 @@ class Supplier
SupplierMailer.creation(self).deliver_now
end
def week_starts_on_monday?
true
end
private
def add_section_on_create