Sha256: 780074010bcbb1406ba2a9b0dc072cf3e2b4971f3e254826029906198918a12a

Contents?: true

Size: 812 Bytes

Versions: 8

Compression:

Stored size: 812 Bytes

Contents

require_relative "base"

module Suspenders
  class ViewsGenerator < Generators::Base
    def create_partials_directory
      empty_directory "app/views/application"
    end

    def create_shared_flashes
      copy_file "_flashes.html.erb", "app/views/application/_flashes.html.erb"
      copy_file "flashes_helper.rb", "app/helpers/flashes_helper.rb"
    end

    def create_shared_javascripts
      copy_file "_javascript.html.erb",
        "app/views/application/_javascript.html.erb"
    end

    def create_shared_css_overrides
      copy_file "_css_overrides.html.erb",
        "app/views/application/_css_overrides.html.erb"
    end

    def create_application_layout
      template "suspenders_layout.html.erb.erb",
        "app/views/layouts/application.html.erb",
        force: true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
suspenders-1.56.1 lib/suspenders/generators/views_generator.rb
suspenders-1.55.1 lib/suspenders/generators/views_generator.rb
suspenders-1.55.0 lib/suspenders/generators/views_generator.rb
suspenders-1.54.1 lib/suspenders/generators/views_generator.rb
suspenders-1.54.0 lib/suspenders/generators/views_generator.rb
suspenders-1.53.0 lib/suspenders/generators/views_generator.rb
suspenders-1.52.0 lib/suspenders/generators/views_generator.rb
suspenders-1.51.0 lib/suspenders/generators/views_generator.rb