mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 21:31:28 +00:00
Fix model + temp fix for view
This commit is contained in:
parent
a66cb599a1
commit
c0a7c88b8d
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<h1 class="title">Listing Users</h1>
|
||||
<p><%= User.lately.count %> players have signed in within the past 30 days.</p>
|
||||
<%= link_to 'Show them', params.merge(filter: 'lately'), class: 'button' %><br><br><br>
|
||||
<% # FIXME: check this %>
|
||||
<%= link_to 'Show them', params.to_enum.to_h.merge(filter: 'lately'), class: 'button' %><br><br><br>
|
||||
|
||||
<p>Search for users by name or Steam ID:</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue