Module: TurboButton::Helper
- Defined in:
- lib/turbo_button/helper.rb
Instance Method Summary collapse
Instance Method Details
#turbo_button(text, action, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/turbo_button/helper.rb', line 3 def (text, action, = {}) controller, action = action.split('#') url = url_for(controller: controller, action: action) (text, url, { form: { data: { turbo_frame: [:frame] || '_top' } }, method: :post, params: [:post] || {} }) end |