Sha256: 41d384187c105b089c64a5a05d4090a8ca6a6b6613b85692b1427b797169459e
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
(Refinery.i18n_enabled? ? Refinery::I18n.frontend_locales : [:en]).each do |lang| I18n.locale = lang if defined?(Refinery::User) Refinery::User.all.each do |user| if user.plugins.find_by_name('<%= plural_name %>').nil? user.plugins.create(:name => "<%= plural_name %>", :position => (user.plugins.maximum(:position) || -1) +1) end end end if defined?(Refinery::Page) page = Refinery::Page.create( :title => "<%= class_name.pluralize.underscore.titleize %>", :link_url => "/<%= plural_name %>/new", :deletable => false, :menu_match => "^/<%= plural_name %>(\/|\/.+?|)$" ) thank_you_page = page.children.create( :title => "Thank You", :link_url => "/<%= plural_name %>/thank_you", :deletable => false, :show_in_menu => false ) Refinery::Pages.default_parts.each do |default_page_part| page.parts.create(:title => default_page_part, :body => nil) thank_you_page.parts.create(:title => default_page_part, :body => nil) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
refinerycms-core-2.0.5 | lib/generators/refinery/form/templates/db/seeds.rb |