Sha256: 352dc05ab309032936d7509fe7043774fad1613cf4942c807049d7156f659ecf

Contents?: true

Size: 429 Bytes

Versions: 5

Compression:

Stored size: 429 Bytes

Contents

class RespondersInstallGenerator < Rails::Generators::Base
  desc "Creates an initializer file with default responder configuration"

  def create_responder_initializer
    create_file "config/initializers/responders.rb", <<-FILE
class #{Rails.application.class.name}Responder
  include FlashResponder
  include HttpCacheResponder
end

ApplicationController.responder = #{Rails.application.class.name}Responder
    FILE
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
responders-0.4.2 lib/generators/responders_install_generator.rb
responders-0.4.1 lib/generators/responders_install_generator.rb
responders-0.4 lib/generators/responders_install_generator.rb
responders-0.2 lib/generators/responders_install_generator.rb
responders-0.1 lib/generators/responders_install_generator.rb