<%= form_for( preferences, method: :patch, url: (preferences.messageboard ? messageboard_preferences_path(preferences.messageboard) : global_preferences_path), html: { class: 'thredded--form thredded--notification-preferences-form', 'data-thredded-user-preferences-form' => true }) do |f| %>

<%= t 'thredded.preferences.form.global_preferences_label' %>

<% if preferences.messageboard %>

<%= t 'thredded.preferences.form.messageboard_preferences_label_html', messageboard: messageboard.name %>

<% end %> <% end %>