module PrefixedIds::Attribute
Included when a module uses `has_prefix_id`
Public Instance Methods
find_by_prefix_id(id)
click to toggle source
# File lib/prefixed_ids.rb, line 56 def find_by_prefix_id(id) find_by(id: _prefix_id.decode(id)) end
find_by_prefix_id!(id)
click to toggle source
# File lib/prefixed_ids.rb, line 60 def find_by_prefix_id!(id) find_by!(id: _prefix_id.decode(id)) end
prefix_id()
click to toggle source
# File lib/prefixed_ids.rb, line 65 def prefix_id self.class._prefix_id.encode(id) end