Sha256: 280a4c62a5f79e8e2f10f4b54df859735349bb12b1df0dc485e64cdcb73ad4f5
Contents?: true
Size: 831 Bytes
Versions: 1
Compression:
Stored size: 831 Bytes
Contents
class JfsLayoutGenerator < Rails::Generator::Base def initialize(runtime_args, runtime_options = {}) super @name = @args.first || 'application' end def manifest record do |m| m.directory 'app/helpers' m.directory 'app/views/layouts' m.directory 'config/locales' m.directory 'public/stylesheets' m.template 'layout.html.erb', "app/views/layouts/#{file_name}.html.erb" m.file 'helper.rb', "app/helpers/layout_helper.rb" m.file 'en.yml', "config/locales/en.layout.yml" m.file 'stylesheet.css', "public/stylesheets/#{file_name}.css" end end def file_name @name.underscore end protected def banner <<-END Generates a basic layout using including a stylesheet and layout helper. USAGE: #{$0} #{spec.name} [layout_name] END end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jfs-generators-0.2.0 | rails_generators/jfs_layout/jfs_layout_generator.rb |