Sha256: 0c4042dcc96d6e85a081cc1b82d5ce3966201c8d765be7866d3c237033328f7b
Contents?: true
Size: 959 Bytes
Versions: 34
Compression:
Stored size: 959 Bytes
Contents
module Cantango module Generators class InstallGenerator < Rails::Generators::Base desc "Add role strategy to a User model" source_root File.expand_path("../templates", __FILE__) class_option :categories, :type => :boolean, :default => true, :desc => "Create categories" class_option :permissions, :type => :boolean, :default => true, :desc => "Create yaml permissions store" def copy_initializer template "cantango.rb", "config/initializers/cantango.rb" end def copy_categories return unless categories? template "categories.yml", "config/categories.yml" end def copy_permissions return unless permissions? template "permissions.yml", "config/permissions.yml" end protected def permissions? options[:permissions] end def categories? options[:categories] end end end end
Version data entries
34 entries across 34 versions & 2 rubygems