YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

Migrate/Remove Plugin: dynamic_form #279

Closed jasonkliu closed 10 years ago

jasonkliu commented 10 years ago

README of dynamic_form plugin

DynamicForm holds a few helpers method to help you deal with your models, they are:

It also adds f.error_messages and f.error_messages_on to your form builders.

jasonkliu commented 10 years ago

Looked for occurrences with grep (all others don't return everything):

$ grep -riIn "error_messages_for" * --exclude-dir=vendor

app/views/categories/index.html.erb:1:<%= error_messages_for :category %>
app/views/notices/_error_messages.html.erb:1:  <%= error_messages_for 'sticky', 'announcement', 'link' %>
app/views/payforms/show.html.erb:11:     <div id="cols-header"><%= error_messages_for 'payform' %></div>
app/views/requested_shifts/_error_messages.html.erb:1:  <%= error_messages_for 'requested_shift' %>
app/views/sub_requests/_error_messages.html.erb:1:  <%= error_messages_for 'sub_request' %>
app/views/template_time_slots/_error_messages.html.erb:1:<%= error_messages_for 'template_time_slot' %>

I think that error_messages_for might be a built-in method (http://apidock.com/rails/ActionView/Helpers/ActiveRecordHelper/error_messages_for)... Dynamic Form is now available as a gem here. I'm going to try to delete the plugin first, then if needed I'll re-add it as a gem.

jasonkliu commented 10 years ago

Right, it's totally important to keep dynamic_form because it adds an important feature, which is f.error_messages. The error_messages method is deprecated in Rails 3, but we can bring it back with the Dynamic Form gem. This issue is ready to close when the pull request #258 is accepted.