module Alchemy::Custom::Model::ModelUtilsMethods
Public Instance Methods
to_url()
click to toggle source
# File lib/alchemy/custom/model/model_utils_methods.rb, line 10 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
ui_title()
click to toggle source
# File lib/alchemy/custom/model/model_utils_methods.rb, line 16 def ui_title self.class.to_s.demodulize.downcase end