Sha256: ffded60fd5f68694f9e27c926eebad2084d867ed04c4ac9ab52eb51538443a39

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

#
#  layout_generator.rb
#
#  Created by Marko Tunjic on 15/07/16.
#  Copyright © 2016 Marko Tunjic. All rights reserved.
#

class LayoutGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  argument :ui, :type => :string, :default => "bootstrap"

  class_option :stylesheet, :type        => :boolean,
                            :default     => true,
                            :description => "Include stylesheets"

  def generate_layout
    if options.stylesheet?
      copy_file "application.scss", "public/stylesheets/application.scss"
    end
    template "layout.html.erb", "app/views/layouts/application.html.erb"

  end
end



Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
actionscaffold-0.3.5 lib/generators/layout/layout_generator.rb