Sha256: 12db6cb4a2b3bcf2f78cd6dca0300775ef1cb434bf4bda808c56cbecc054e446
Contents?: true
Size: 667 Bytes
Versions: 11
Compression:
Stored size: 667 Bytes
Contents
module Alchemy module Custom module Model module ModelUtilsMethods extend ActiveSupport::Concern included do def to_url layout = Alchemy::PageLayout.get_all_by_attributes(custom_model: self.class.to_s).select { |ly| ly["custom_model_action"] == "show" }.first page = Alchemy::Language.current.pages.find_by(page_layout: layout["name"]).parent page.urlname end def ui_title self.class.to_s.demodulize.downcase end def breadcrumb_name self.class.to_s.demodulize.titleize end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems