variable name fix and make is_tester method global for reuse in views
This commit is contained in:
parent
e544d6a6db
commit
77f76b1b5a
3 changed files with 22 additions and 21 deletions
|
@ -41,13 +41,9 @@ class FollowService
|
||||||
if reason == 'created'
|
if reason == 'created'
|
||||||
return user.settings.follow_map_on_created == '1'
|
return user.settings.follow_map_on_created == '1'
|
||||||
elsif reason == 'contributed'
|
elsif reason == 'contributed'
|
||||||
return user.settings.follow_map_contributed == '1'
|
return user.settings.follow_map_on_contributed == '1'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_tester(user)
|
|
||||||
%w(connorturland@gmail.com devin@callysto.com chessscholar@gmail.com solaureum@gmail.com ishanshapiro@gmail.com).include?(user.email)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,22 +45,24 @@
|
||||||
<%= form.check_box :emails_allowed, class: 'inline' %>
|
<%= form.check_box :emails_allowed, class: 'inline' %>
|
||||||
Send Metamaps notifications to my email.
|
Send Metamaps notifications to my email.
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= fields_for :settings, @user.settings do |settings| %>
|
<% if is_tester(@user) %>
|
||||||
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %>
|
<%= fields_for :settings, @user.settings do |settings| %>
|
||||||
<%= settings.check_box :follow_topic_on_created, class: 'inline' %>
|
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %>
|
||||||
Auto-follow topics you create.
|
<%= settings.check_box :follow_topic_on_created, class: 'inline' %>
|
||||||
<% end %>
|
Auto-follow topics you create.
|
||||||
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %>
|
<% end %>
|
||||||
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %>
|
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %>
|
||||||
Auto-follow topics you edit.
|
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %>
|
||||||
<% end %>
|
Auto-follow topics you edit.
|
||||||
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %>
|
<% end %>
|
||||||
<%= settings.check_box :follow_map_on_created, class: 'inline' %>
|
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %>
|
||||||
Auto-follow maps you create.
|
<%= settings.check_box :follow_map_on_created, class: 'inline' %>
|
||||||
<% end %>
|
Auto-follow maps you create.
|
||||||
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %>
|
<% end %>
|
||||||
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %>
|
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %>
|
||||||
Auto-follow maps you edit.
|
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %>
|
||||||
|
Auto-follow maps you edit.
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
3
config/initializers/internal_testers.rb
Normal file
3
config/initializers/internal_testers.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
def is_tester(user)
|
||||||
|
user && %w(connorturland@gmail.com devin@callysto.com chessscholar@gmail.com solaureum@gmail.com ishanshapiro@gmail.com).include?(user.email)
|
||||||
|
end
|
Loading…
Reference in a new issue