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'
|
||||
return user.settings.follow_map_on_created == '1'
|
||||
elsif reason == 'contributed'
|
||||
return user.settings.follow_map_contributed == '1'
|
||||
return user.settings.follow_map_on_contributed == '1'
|
||||
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
|
||||
|
|
|
@ -45,22 +45,24 @@
|
|||
<%= form.check_box :emails_allowed, class: 'inline' %>
|
||||
Send Metamaps notifications to my email.
|
||||
<% end %>
|
||||
<%= fields_for :settings, @user.settings do |settings| %>
|
||||
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_topic_on_created, class: 'inline' %>
|
||||
Auto-follow topics you create.
|
||||
<% end %>
|
||||
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %>
|
||||
Auto-follow topics you edit.
|
||||
<% end %>
|
||||
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_map_on_created, class: 'inline' %>
|
||||
Auto-follow maps you create.
|
||||
<% end %>
|
||||
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %>
|
||||
Auto-follow maps you edit.
|
||||
<% if is_tester(@user) %>
|
||||
<%= fields_for :settings, @user.settings do |settings| %>
|
||||
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_topic_on_created, class: 'inline' %>
|
||||
Auto-follow topics you create.
|
||||
<% end %>
|
||||
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %>
|
||||
Auto-follow topics you edit.
|
||||
<% end %>
|
||||
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_map_on_created, class: 'inline' %>
|
||||
Auto-follow maps you create.
|
||||
<% end %>
|
||||
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %>
|
||||
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %>
|
||||
Auto-follow maps you edit.
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</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