Class: IpAddress
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- IpAddress
- Includes:
- Toggleable
- Defined in:
- app/models/ip_address.rb
Overview
IP address
Attributes:
banned [boolean]
created_at [DateTime]
ip [inet]
object_count [integer]
updated_at [DateTime]
Class Method Summary collapse
Class Method Details
.[](ip) ⇒ Object
26 27 28 29 30 |
# File 'app/models/ip_address.rb', line 26 def self.[](ip) return if ip.blank? find_or_create_by(ip: ip) end |
.page_for_administration(page = 1) ⇒ Object
21 22 23 |
# File 'app/models/ip_address.rb', line 21 def self.page_for_administration(page = 1) list_for_administration.page(page) end |