Module: BodyId::Helper
- Defined in:
- lib/body_id/helper.rb
Instance Method Summary collapse
Instance Method Details
#body_id ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/body_id/helper.rb', line 5 def body_id controller = controller_name.singularize.underscore action = action_name.underscore body_id = "#{ controller }-#{ action }".gsub(/_/, '-') # Controller declared instance variable # or helper generated string @body_id || body_id end |