Module: Locomotive::Concerns::Site::UrlRedirections::ClassMethods

Defined in:
app/models/locomotive/concerns/site/url_redirections.rb

Instance Method Summary collapse

Instance Method Details

#inc_url_redirection_counter(site_id, url) ⇒ Object


21
22
23
24
# File 'app/models/locomotive/concerns/site/url_redirections.rb', line 21

def inc_url_redirection_counter(site_id, url)
  url_id = Digest::MD5.hexdigest(url)
  self.where(_id: site_id).inc("url_redirections_information.#{url_id}.counter" => 1)
end