Class: Noah::Token
Instance Method Summary
collapse
Methods included from Linkable
included, #link!, #unlink!
Methods included from Taggable
included, #tag!, #untag!
Methods inherited from Model
inherited
Instance Method Details
#to_hash ⇒ Object
22
23
24
25
|
# File 'lib/noah/models/tokens.rb', line 22
def to_hash
h = {:token => token, :lifetime => lifetime, :created_at => created_at, :updated_at => updated_at}
super.merge(h)
end
|
#validate ⇒ Object
15
16
17
18
19
20
|
# File 'lib/noah/models/tokens.rb', line 15
def validate
super
assert_present :name
assert_unique :name
assert_unique :token
end
|