Module: SpreeMail::HasToken
- Included in:
- Email, Subscriber
- Defined in:
- lib/spree_mail/has_token.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.included(model) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/spree_mail/has_token.rb', line 4 def self.included(model) model.instance_eval do attr_readonly :token validates :token, :presence => true before_validation :set_token, :on => :create end model.send(:include, InstanceMethods) end |