Module: DatePicker::FormHelper
- Defined in:
- lib/date_picker/form_helper.rb
Defined Under Namespace
Modules: FormBuilderMethods
Class Method Summary
collapse
Class Method Details
.field_id(object_name, attribute) ⇒ Object
4
5
6
|
# File 'lib/date_picker/form_helper.rb', line 4
def self.field_id(object_name, attribute)
object_name.to_s.gsub(/\]\[|[^-a-zA-Z0-9:.]/,"_").sub(/_$/,"") + "_" + attribute.to_s
end
|
.included(base) ⇒ Object
8
9
10
11
12
|
# File 'lib/date_picker/form_helper.rb', line 8
def self.included(base)
ActionView::Helpers::FormBuilder.instance_eval do
include FormBuilderMethods
end
end
|