Class: Hobo::SubsiteTaglibGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Hobo::SubsiteTaglibGenerator
- Includes:
- classy_module do class_option :invite_only, :aliases => '-i', :type => :boolean, :desc => "Add features for an invite only website" private def invite_only? options[:invite_only] end end, classy_module do class_option :user_resource_name, :type => :string, :desc => "User Resource Name", :default => 'user' end
- Defined in:
- lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
10 11 12 |
# File 'lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb', line 10 def self. "rails generate hobo:subsite_taglib NAME [options]" end |
Instance Method Details
#generate_taglib ⇒ Object
14 15 16 17 |
# File 'lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb', line 14 def generate_taglib template "taglib.dryml.erb", File.join('app/views/taglibs', "#{file_name}_site.dryml") Rails::Generators.invoke('hobo:install_default_plugins', ["--subsite=#{file_name}", "--theme=hobo_#{options[:theme]}", "--ui_theme=#{options[:ui_theme]}"]) end |