Sha256: 088b7d3e9e3513b9ba74ede5b39017e02730547784b9d4dd87482df646ce3848
Contents?: true
Size: 392 Bytes
Versions: 19
Compression:
Stored size: 392 Bytes
Contents
# Used for link-methods in Rails apps class Baza::DatabaseModel def initialize(instance) @instance = instance end def model_name Baza::DatabaseModelName.new(@instance) end def persisted? true end def to_param if @instance.respond_to?(:to_param) @instance.try(:to_param) else @instance.name end end def id @instance.name end end
Version data entries
19 entries across 19 versions & 1 rubygems