Sha256: 7b466317c3635cc318683b0fc519d470f5b01108cc886a21ccb4d4f3d899884b
Contents?: true
Size: 781 Bytes
Versions: 42
Compression:
Stored size: 781 Bytes
Contents
module ActiveadminSelleoCms module Generators class InstallGenerator < Rails::Generators::Base desc "Installs ActiveAdmin Selleo CMS" def self.source_root File.expand_path("../templates", __FILE__) end def setup_routes routing_code = "mount ActiveadminSelleoCms::Engine => '/'" log :route, routing_code sentinel = /ActiveAdmin\.routes.*$/ in_root do inject_into_file 'config/routes.rb', "\n\n #{routing_code}", { :after => sentinel, :verbose => false } end end def setup_migrations rake "activeadmin_selleo_cms:install:migrations" end def copy_sample_layout copy_file "cms.html.erb", "app/views/layouts/cms.html.erb" end end end end
Version data entries
42 entries across 42 versions & 1 rubygems