Class: DoorMat::SignIn
- Inherits:
-
Object
- Object
- DoorMat::SignIn
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/door_mat/sign_in.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#is_public ⇒ Object
Returns the value of attribute is_public.
-
#password ⇒ Object
Returns the value of attribute password.
-
#remember_me ⇒ Object
Returns the value of attribute remember_me.
Instance Method Summary collapse
- #add_generic_error_msg ⇒ Object
-
#initialize(attributes = {}) ⇒ SignIn
constructor
A new instance of SignIn.
- #is_public? ⇒ Boolean
- #remember_me? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ SignIn
Returns a new instance of SignIn.
11 12 13 14 15 16 |
# File 'app/models/door_mat/sign_in.rb', line 11 def initialize(attributes={}) super @is_public = '1' if @is_public.nil? @remember_me = '0' if @remember_me.nil? end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'app/models/door_mat/sign_in.rb', line 6 def email @email end |
#is_public ⇒ Object
Returns the value of attribute is_public.
6 7 8 |
# File 'app/models/door_mat/sign_in.rb', line 6 def is_public @is_public end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'app/models/door_mat/sign_in.rb', line 6 def password @password end |
#remember_me ⇒ Object
Returns the value of attribute remember_me.
6 7 8 |
# File 'app/models/door_mat/sign_in.rb', line 6 def remember_me @remember_me end |
Instance Method Details
#add_generic_error_msg ⇒ Object
26 27 28 |
# File 'app/models/door_mat/sign_in.rb', line 26 def add_generic_error_msg self.errors[:base] << I18n.t("door_mat.sign_in.failed") end |
#is_public? ⇒ Boolean
18 19 20 |
# File 'app/models/door_mat/sign_in.rb', line 18 def is_public? '1' == @is_public end |
#remember_me? ⇒ Boolean
22 23 24 |
# File 'app/models/door_mat/sign_in.rb', line 22 def remember_me? '1' == @remember_me end |