Sha256: f229e0a17b50ed0a7e59b9177b1f2ea829b6acfa8c17cfd2b0dc93d68e10b354

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module Responders
        def finish_template
          gem 'responders'
          copy_file 'application_responder.rb', 'lib/application_responder.rb'

          inject_into_class 'app/controllers/application_controller.rb', 'ApplicationController' do
            <<-RUBY
  self.responder = ApplicationResponder
  respond_to :html

            RUBY
          end

          application do
            <<-RUBY
# Enable auto-loading from ./lib
    config.autoload_paths << Rails.root.join('lib')
            RUBY
          end
          super
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stationed-0.0.1 lib/stationed/generators/plugins/responders.rb