Sha256: 6755f54daf9ab8424ec92571cb128cda08e65151fd41315bf7d485a9ae6a07b6

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

module Museum
  class ViewsGenerator < Rails::Generators::Base
    source_root File.expand_path('../../../../../app/views/cases', __FILE__)
    require File.expand_path('../../utils', __FILE__)
    include Generators::Utils
    
    # all public methods in here will be run in order

    def add_views
      output "I'm copying the default views into app/views/cases for you.", :magenta
      template "index.html.haml", "app/views/cases/index.html.haml"
      template "show.html.haml", "app/views/cases/show.html.haml"
      template "_widget.html.haml", "app/views/cases/_widget.html.haml"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
museum-0.0.4 lib/generators/museum/views/views_generator.rb
museum-0.0.3 lib/generators/museum/views/views_generator.rb
museum-0.0.2 lib/generators/museum/views/views_generator.rb
museum-0.0.1 lib/generators/museum/views/views_generator.rb