kristianmandrup / ui_datepicker-rails3

jQuery UI datepicker integration for Formtastic, Simple Form and Active Admin
MIT License
50 stars 15 forks source link

Formtastic "Unable to find input class" #15

Open fabiosammy opened 11 years ago

fabiosammy commented 11 years ago

Hi guys... I have a problem with this gem.

I'm using the Formtastic v2.2.1, but when i add ":as => :ui_date_picker" in my input, i will received this error:

"Unable to find input class for ui_date_picker"

My code:

= f.input :data_de_nascimento, :wrapper_html => { :class => 'fl right' }, :as => :ui_date_picker

My formtastic.rb initializer:

UiDatePickerRails3.activate :formtastic

PS: Sorry my poor English. =)

kristianmandrup commented 11 years ago

Yes, Since Formtastic 2.2 (I think) the Input class infrastructure was changed. This gem needs an update to work with Formtastic 2.2+. There should be a Formtastic::VERSION you can use to determine how to set up the formtastic integration. Please see the Formtastic code for the Date input field. Cheers ;)

https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/inputs/datetime_input.rb https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/inputs/date_select_input.rb https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/inputs/date_picker_input.rb

Happy coding ;)

fabiosammy commented 11 years ago

"let's code tonight" =D

Thanks man! I never code a gem, but i will try. =]

kristianmandrup commented 11 years ago

You will soon get addicted!!! I coded more than 100 gems already, and never got around to coding much pure Rails :P