Sha256: 46b346cd8a8b6cb0f03e8b0bc2ba4c939b9667e66f4d5e4da45686adfd590fe0

Contents?: true

Size: 145 Bytes

Versions: 5

Compression:

Stored size: 145 Bytes

Contents

if defined?(ActiveRecord)
  class ActiveRecord::Base
    def element_id
      "#{self.class.to_s.underscore}_#{self.to_param}"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
freighthopper-0.1.14 lib/freighthopper/activerecord/element_id.rb
freighthopper-0.1.13 lib/freighthopper/activerecord/element_id.rb
freighthopper-0.1.12 lib/freighthopper/activerecord/element_id.rb
freighthopper-0.1.11 lib/freighthopper/activerecord/element_id.rb
freighthopper-0.1.9 lib/freighthopper/activerecord/element_id.rb