Class: ActionController::Parameters
- Inherits:
-
Object
- Object
- ActionController::Parameters
- Defined in:
- lib/combined_time_select.rb
Instance Method Summary collapse
Instance Method Details
#parse_time_select!(attribute) ⇒ Object
95 96 97 98 99 |
# File 'lib/combined_time_select.rb', line 95 def parse_time_select!(attribute) self[attribute] = Time.zone.parse("#{self["#{attribute}(1i)"]}-#{self["#{attribute}(2i)"]}-#{self["#{attribute}(3i)"]} #{self["#{attribute}(5i)"]}") (1..5).each { |i| self.delete "#{attribute}(#{i}i)" } self end |