Code Duplication    Length = 4-4 lines in 2 locations

app/helpers/rooms_helper.rb 1 location

@@ 26-29 (lines=4) @@
23
    "http://calendar.google.com/calendar/r/eventedit?text=#{@room.name}&location=#{request.base_url + request.fullpath}"
24
  end
25
26
  def room_authentication_required
27
    Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
28
      current_user.nil?
29
  end
30
31
  def number_of_rooms_allowed
32
    Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i

app/controllers/rooms_controller.rb 1 location

@@ 299-302 (lines=4) @@
296
    redirect_to admins_path if current_user && current_user&.has_role?(:super_admin)
297
  end
298
299
  def auth_required
300
    Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
301
      current_user.nil?
302
  end
303
304
  def room_limit_exceeded
305
    limit = Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i