Sha256: 47c3af9e8a91203571d16e572f4f3d9659923d68b7a8496b4626f248a744a7de

Contents?: true

Size: 260 Bytes

Versions: 1

Compression:

Stored size: 260 Bytes

Contents

class Share < ActiveRecord::Base
  belongs_to :shareable, :polymorphic => true
  before_create :set_url_hash
  
  def set_url_hash
    self.url_hash = Digest::SHA1.hexdigest("#{shareable_type}#{shareable_id}#{user_id}how_are_we_doing#{service_ident}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
how_are_we_doing-0.0.2 app/models/share.rb