Sha256: 4b1011fb7247fa320cecb1367794ed4bb044a6b1cb65960aae1436dfcf2ea6c4
Contents?: true
Size: 846 Bytes
Versions: 9
Compression:
Stored size: 846 Bytes
Contents
Refinery::I18n.frontend_locales.each do |lang| I18n.locale = lang Refinery::User.find_each do |user| user.plugins.where(name: 'refinerycms-<%= namespacing.underscore %>').first_or_create!( position: (user.plugins.maximum(:position) || -1) +1 ) end if defined?(Refinery::User) <% unless skip_frontend? -%> Refinery::Page.where(link_url: (url = "/<%= [(namespacing.underscore if namespacing.underscore != plural_name), plural_name].compact.join('/') %>")).first_or_create!( title: '<%= class_name.pluralize.underscore.titleize %>', deletable: false, menu_match: "^#{url}(\/|\/.+?|)$" ) do |page| Refinery::Pages.default_parts.each_with_index do |part, index| page.parts.build title: part[:title], slug: part[:slug], body: nil, position: index end end if defined?(Refinery::Page) <% end -%> end
Version data entries
9 entries across 9 versions & 1 rubygems