Sha256: 01a624337c04f800da058e7680aa6e1f3f4cc7a3547382f5b4ec56a29837252e

Contents?: true

Size: 634 Bytes

Versions: 8

Compression:

Stored size: 634 Bytes

Contents

require "rails/generators/resource_helpers"

module Curly # :nodoc:
  module Generators # :nodoc:
    class InstallGenerator < Rails::Generators::Base # :nodoc:

      source_root File.expand_path("../templates", __FILE__)

      attr_reader :app_name

      def generate_layout
        app = ::Rails.application
        @app_name = app.class.to_s.split("::").first
        remove_file 'app/views/layouts/application.html.erb'
        template "layout.html.curly.erb", "app/views/layouts/application.html.curly"
        template "layout_presenter.rb.erb", "app/presenters/layouts/application_presenter.rb"
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
curly-templates-3.4.0 lib/generators/curly/install/install_generator.rb
curly-templates-3.3.0 lib/generators/curly/install/install_generator.rb
curly-templates-3.2.0 lib/generators/curly/install/install_generator.rb
curly-templates-3.1.0 lib/generators/curly/install/install_generator.rb
curly-templates-3.0.0 lib/generators/curly/install/install_generator.rb
curly-templates-2.6.5 lib/generators/curly/install/install_generator.rb
curly-templates-2.6.4 lib/generators/curly/install/install_generator.rb
curly-templates-2.6.3 lib/generators/curly/install/install_generator.rb