module DatePicker::FormHelper

Public Class Methods

field_id(object_name, attribute) click to toggle source
# 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) click to toggle source
# File lib/date_picker/form_helper.rb, line 8
def self.included(base)
  ActionView::Helpers::FormBuilder.instance_eval do
    include FormBuilderMethods
  end
end