rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

Generated form with datetime doesn't produce valid field #294

Closed keoghpe closed 5 years ago

keoghpe commented 5 years ago

Checklist

My Environment

Software Version
Operating System MacOS
Jets 1.9.18
Ruby 2.6.3

Expected Behaviour

Generating a resource with a datetime should generate a form with the appropriate datetime field.

Current Behavior

Jets generates a form with datetime_select_tag resulting in a action view undefined method error.

ActionView::Template::Error: undefined method `datetime_select_tag' for #<#<Class:0x00007ff4faac6038>:0x00007ff4fd951c40>
Did you mean?  datetime_select
               datetime_field_tag

Step-by-step reproduction instructions

Generate a resource with a datetime:

jets g resource MyResource my_time:datetime

Visit localhost:8888/my_resources/new

Solution Suggestion

Update the generator to produce datetime_field_tag. I initially tried to use datetime_select but this didn't save to the DB.

tongueroo commented 5 years ago

Done #318 Released in v2.0.0 🎉