Class: DateTimeComponent
- Inherits:
-
BaseComponent
- Object
- AbstractController::Base
- Puffer::Component::Base
- BaseComponent
- DateTimeComponent
- Defined in:
- app/components/date_time_component.rb
Instance Attribute Summary
Attributes inherited from Puffer::Component::Base
#field, #identifer, #opts, #parent_controller, #resource
Instance Method Summary collapse
Methods inherited from BaseComponent
Methods inherited from Puffer::Component::Base
#component_id, #event_options, #event_path, #event_url, #fallback_action, #initialize, #javascript_wrap, #method_for_action, #process, #record, #records, #render, #replace, #send_action
Methods included from Puffer::Component::Base::ClassMethods
#controller_path, #render_component
Constructor Details
This class inherits a constructor from Puffer::Component::Base
Instance Method Details
#form ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/components/date_time_component.rb', line 3 def form @format = case field.type when :date then '%Y-%m-%d' when :time then '%H:%M:%S' when :datetime, :timestamp then '%Y-%m-%d %H:%M:%S' end super end |