Method: Time.extract_from_attributes!
- Defined in:
- lib/time_hacks.rb
.extract_from_attributes!(attrs, field, method = :local) ⇒ Object
3 4 5 6 7 |
# File 'lib/time_hacks.rb', line 3 def extract_from_attributes!(attrs, field, method = :local) parse_from_attributes(attrs, field, method).tap do |time| attrs.delete_if { |k, v| k.to_s =~ /^#{field}.+/ } end unless attrs.blank? end |