mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Code style fixes
This commit is contained in:
parent
c6bbc67dab
commit
d8acf60049
72 changed files with 458 additions and 594 deletions
|
|
@ -1,5 +1,4 @@
|
|||
module PreferencesHelper
|
||||
|
||||
def pref(model, pref_name, &block)
|
||||
s = content_tag(:label, Preference.human_attribute_name(pref_name), :for => model + "_" + pref_name)
|
||||
s << yield
|
||||
|
|
@ -10,7 +9,7 @@ module PreferencesHelper
|
|||
pref(model, pref_name) { check_box(model, pref_name, class: "form-control") }
|
||||
end
|
||||
|
||||
def pref_with_select_field(model, pref_name, collection = [ [t('preferences.is_true'),true], [t('preferences.is_false'), false] ])
|
||||
def pref_with_select_field(model, pref_name, collection = [[t('preferences.is_true'), true], [t('preferences.is_false'), false]])
|
||||
pref(model, pref_name) { select(model, pref_name, collection, {}, class: "form-control") }
|
||||
end
|
||||
|
||||
|
|
@ -21,8 +20,8 @@ module PreferencesHelper
|
|||
def profile_delete_user(user)
|
||||
return link_to(
|
||||
t('users.destroy_user'),
|
||||
url_for({:controller => 'users', :action => 'destroy', :id => user.id}),
|
||||
{:id => "delete_user_#{user.id}",
|
||||
url_for({ :controller => 'users', :action => 'destroy', :id => user.id }),
|
||||
{ :id => "delete_user_#{user.id}",
|
||||
:class => "delete_user_button btn btn-danger",
|
||||
:title => t('users.destroy_user'),
|
||||
:x_confirm_message => t('users.destroy_confirmation', :login => user.login)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue