1
0

system_helpers.rb 396 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. module SystemHelpers
  3. def admin_user
  4. Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
  5. end
  6. def submit_button
  7. I18n.t('generic.save_changes')
  8. end
  9. def success_message
  10. I18n.t('generic.changes_saved_msg')
  11. end
  12. def form_label(key)
  13. I18n.t key, scope: 'simple_form.labels'
  14. end
  15. def css_id(record)
  16. "##{dom_id(record)}"
  17. end
  18. end