Hash: select entries by keys

This commit is contained in:
Karl Erik Õunapuu 2021-01-07 13:59:12 +02:00
parent c23075fa19
commit c58b4fb2e9
No known key found for this signature in database
GPG key ID: C9DD647298A34764
11 changed files with 201 additions and 141 deletions

View file

@ -63,7 +63,7 @@ class Nameserver < ApplicationRecord
end
class << self
def find_by_hash_params params
def from_hash_params params
params = params.with_indifferent_access
rel = all
rel = rel.where(hostname: params[:hostname])