Sha256: 8ffbf93e69494feb57313e9ace00127ec2017900371922e74838b662dc442e72
Contents?: true
Size: 871 Bytes
Versions: 4
Compression:
Stored size: 871 Bytes
Contents
module Hobo class AdminSubsiteGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) # overrides the default argument :name, :type => :string, :default => 'admin', :optional => true include Generators::Hobo::InviteOnly include Generators::HoboSupport::EvalTemplate def self.banner "rails generate hobo:admin_subsite [NAME=admin] [options]" end def generate_admin_user_controller invoke "hobo:controller", ["#{file_name}/#{options[:user_resource_name].pluralize.underscore}"], options template "users_index.dryml", "app/views/#{file_name}/#{options[:user_resource_name].pluralize.underscore}/index.dryml" end include Generators::Hobo::Subsite def generate_site_taglib invoke 'hobo:subsite_taglib', [name], options.merge(:admin => true) end end end
Version data entries
4 entries across 4 versions & 1 rubygems