major updates to security and hacking logick

This commit is contained in:
2013-01-13 12:21:30 +01:00
parent b02951aaec
commit f08d19a50b
19 changed files with 379 additions and 296 deletions
+6
View File
@@ -6,6 +6,8 @@ class Supplier
property :name
property :open, type: :boolean, default: false
property :night_offset, type: Float
#LOCATION
property :lat, type: Float, default: 52.08062426379751
property :lng, type: Float, default: 4.312562942504883
@@ -15,6 +17,9 @@ class Supplier
property :wifi_type
property :wifi_password
#REVIEWS
property :iens_profile
#has_many :orders, through: :lists
has_many :products, dependent: :destroy
has_many :product_categories, dependent: :destroy
@@ -29,6 +34,7 @@ class Supplier
view :by_email, key: :email
validates :name, presence: true
validates :iens_profile, numericality: true
def location=(val)
lat, lng = val.strip.split(/[ ,]+/).map(&:to_f)