Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't protect promotions

  • Loading branch information...
commit 8e42b3ee7a43c338be5d7c68077073eb3a47e4d6 1 parent 7b07115
@nateberkopec nateberkopec authored
View
3  promo/app/models/promotion.rb
@@ -2,8 +2,7 @@ class Promotion < Activator
MATCH_POLICIES = %w(all any)
- attr_accessible :name, :promotion_actions_attributes, :preferred_match_policy,
- :preferred_usage_limit, :promotion_rules_attributes
+ attr_protected #none
preference :usage_limit, :integer
preference :match_policy, :string, :default => MATCH_POLICIES.first
View
2  promo/app/models/promotion_action.rb
@@ -3,7 +3,7 @@
class PromotionAction < ActiveRecord::Base
belongs_to :promotion, :foreign_key => 'activator_id'
- attr_accessible :type
+ attr_protected #none
scope :of_type, lambda {|t| {:conditions => {:type => t}}}
View
2  promo/app/models/promotion_rule.rb
@@ -2,7 +2,7 @@
class PromotionRule < ActiveRecord::Base
belongs_to :promotion, :foreign_key => 'activator_id'
- attr_accessible :type
+ attr_protected #none
scope :of_type, lambda {|t| {:conditions => {:type => t}}}
Please sign in to comment.
Something went wrong with that request. Please try again.