Guest User

Untitled

a guest
Jan 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. form.input :notes
  2.  
  3. <input name="job[shifts][shift_id][notes]" />
  4.  
  5. form.whatever :notes # Returns "job[shifts][shift_id][notes]"
  6.  
  7. def dom_input_name(form, field_name)
  8. "#{form.object_name}[#{field_name.to_s.sub(/?$/,"")}]"
  9. end
  10.  
  11. dom_input_name(form, :notes)
Add Comment
Please, Sign In to add comment