diff --git a/app/models/ban.rb b/app/models/ban.rb index bb5e5ec..bf5c406 100755 --- a/app/models/ban.rb +++ b/app/models/ban.rb @@ -80,8 +80,8 @@ class Ban < ActiveRecord::Base if user_name self.user = User.find_by_username(user_name) else - self.user = User.first(conditions: { steamid: steamid }) - self.server = Server.first(conditions: ["CONCAT(ip, ':', port) = ?", addr]) + self.user = User.where(steamid: steamid).first + self.server = Server.where("CONCAT(ip, ':', port) = ?", addr).first end end diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 9ce4e05..c73b97c 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,6 +1,7 @@

Listing Users

<%= User.lately.count %> players have signed in within the past 30 days.

-<%= link_to 'Show them', params.merge(filter: 'lately'), class: 'button' %>


+<% # FIXME: check this %> +<%= link_to 'Show them', params.to_enum.to_h.merge(filter: 'lately'), class: 'button' %>


Search for users by name or Steam ID: