Permalink
Browse files

Added class_option for the Slim layout generation

  • Loading branch information...
1 parent 4a82a9e commit f764583d99d38c4f46b15d29b9414bea8e1d7d02 @pjamest committed Oct 11, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/foundation/generators/layout_generator.rb
@@ -7,11 +7,12 @@ class LayoutGenerator < Rails::Generators::Base
argument :layout_name, :type => :string, :default => 'application', :banner => 'layout_name'
class_option :haml, :desc => 'Generate HAML layout instead of ERB.', :type => :boolean
+ class_option :slim, :desc => 'Generate Slim layout instead of ERB.', :type => :boolean
def create_layout
if options.haml?
template 'application.html.haml', "app/views/layouts/#{file_name}.html.haml"
- elsif
+ elsif options.slim?
template 'application.html.slim', "app/views/layouts/#{file_name}.html.slim"
else
template 'application.html.erb', "app/views/layouts/#{file_name}.html.erb"

0 comments on commit f764583

Please sign in to comment.