Module: ActiveScaffold::DateSelectExtension
- Defined in:
- lib/active_scaffold/extensions/name_option_for_datetime.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/active_scaffold/extensions/name_option_for_datetime.rb', line 7 def self.included(base) base.class_eval do alias_method_chain :datetime_selector, :name private :datetime_selector_without_name, :datetime_selector_with_name, :datetime_selector end end |
Instance Method Details
#datetime_selector_with_name(options, html_options) ⇒ Object
3 4 5 6 |
# File 'lib/active_scaffold/extensions/name_option_for_datetime.rb', line 3 def datetime_selector_with_name(, ) .merge!(:prefix => [:name].gsub(/\[[^\[]*\]$/, '')) if [:name] datetime_selector_without_name(, ) end |