Module: TermsHelper
- Defined in:
- app/helpers/terms_helper.rb
Instance Method Summary collapse
Instance Method Details
#terms_data(terms, redirect) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/terms_helper.rb', line 4 def terms_data(terms, redirect) redirect_params = { redirect: redirect } if redirect { terms: markdown_field(terms, :terms), permissions: { can_accept: can?(current_user, :accept_terms, terms), can_decline: can?(current_user, :decline_terms, terms) }, paths: { accept: accept_term_path(terms, redirect_params), decline: decline_term_path(terms, redirect_params), root: root_path } }.to_json end |