Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- form.input :notes
- <input name="job[shifts][shift_id][notes]" />
- form.whatever :notes # Returns "job[shifts][shift_id][notes]"
- def dom_input_name(form, field_name)
- "#{form.object_name}[#{field_name.to_s.sub(/?$/,"")}]"
- end
- dom_input_name(form, :notes)
Add Comment
Please, Sign In to add comment