Sha256: c8ea8922c7392c5e46605a67a70e993b1b92ff6961ad5575b8ec03b8e9261d8a
Contents?: true
Size: 554 Bytes
Versions: 2
Compression:
Stored size: 554 Bytes
Contents
module Adminpanel module RouterHelper def get_gallery_children(resource) resource_class(resource).gallery_children end def resources_parameters(resource) resource_class(resource).routes_options end def rest_path_names { path_names: { new: I18n.t('routes.new'), edit: I18n.t('routes.edit'), show: I18n.t('routes.show') } } end private def resource_class(resource) "adminpanel/#{resource.to_s.singularize}".classify.constantize end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminpanel-2.1.0 | app/helpers/adminpanel/router_helper.rb |
adminpanel-2.0.1 | app/helpers/adminpanel/router_helper.rb |