Module: CuteKV::Timestamp::ClassMethods
- Defined in:
- lib/cute_kv/timestamp.rb
Instance Method Summary collapse
Instance Method Details
#add_timestamps ⇒ Object
25 26 27 |
# File 'lib/cute_kv/timestamp.rb', line 25 def assign(:created_at, :updated_at) unless end |
#already_has_timestamp? ⇒ Boolean
29 30 31 32 |
# File 'lib/cute_kv/timestamp.rb', line 29 def attrs = self.assigned_attributes attrs.include?(:created_at) && attrs.include?(:updated_at) end |
#default_timezone ⇒ Object
20 21 22 23 |
# File 'lib/cute_kv/timestamp.rb', line 20 def default_timezone @timezone = Timestamp::default_timezone @timezone.to_sym end |