Module: Authlogic::Session::Existence::ClassMethods
- Defined in:
- lib/authlogic/session/existence.rb
Instance Method Summary collapse
-
#create(*args, &block) ⇒ Object
A convenince method.
-
#create!(*args) ⇒ Object
Same as create but calls create!, which raises an exception when validation fails.
Instance Method Details
#create(*args, &block) ⇒ Object
A convenince method. The same as:
session = UserSession.new(*args)
session.save
Instead you can do:
UserSession.create(*args)
28 29 30 31 |
# File 'lib/authlogic/session/existence.rb', line 28 def create(*args, &block) session = new(*args) session.save(&block) end |
#create!(*args) ⇒ Object
Same as create but calls create!, which raises an exception when validation fails.
34 35 36 37 |
# File 'lib/authlogic/session/existence.rb', line 34 def create!(*args) session = new(*args) session.save! end |