Sha256: 029b6c8eb86bc04a2ed11b4898658e43a42662599b8b41a1e8f56e075237e5c2

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

# Generate initial files for the gem to work.
class TitleistGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def copy_locale
    template 'locale.yml.erb', 'config/locales/titleist.en.yml'
  end

  def update_default_application_layout
    gsub_file(
      'app/views/layouts/application.html.erb',
      %r{\s\s\s\s<title>(.*)</title>},
      '    <%= title_tag %>'
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
titleist-0.1.0 lib/generators/titleist/titleist_generator.rb