Sha256: beaac31b50c0b4e73ee018444588e60065011ca1477e798cad6f2f4bb8ac5bd7
Contents?: true
Size: 932 Bytes
Versions: 14
Compression:
Stored size: 932 Bytes
Contents
module Ecm module Rbac module Backend module Generators class InstallGenerator < Rails::Generators::Base desc 'Generates the intializer' source_root File.expand_path('../templates', __FILE__) def generate_initializer copy_file 'initializer.rb', 'config/initializers/ecm_rbac_backend.rb' end def generate_routes route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source')) end def add_to_itsf_backend insert_into_itsf_backend_config(Ecm::Rbac::Backend::Engine) end private def insert_into_itsf_backend_config(engine_name) inject_into_file 'config/initializers/001_itsf_backend.rb', after: "config.backend_engines = %w(\n" do " #{engine_name}\n" end end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems