Sha256: 678b77d83a13ce0ecd090d1d0d3246487939515f14384ca4a90897db421b48cf
Contents?: true
Size: 659 Bytes
Versions: 3
Compression:
Stored size: 659 Bytes
Contents
class RespondersInstallGenerator < Rails::Generators::Base def self.source_root @_source_root ||= File.expand_path("..", __FILE__) end desc "Creates an initializer with default responder configuration and copy locale file" def create_responder_initializer create_file "config/initializers/responders.rb", <<-FILE class ApplicationResponder include Responders::FlashResponder include Responders::HttpCacheResponder end ApplicationController.respond_to :html ApplicationController.responder = ApplicationResponder FILE end def copy_locale copy_file "../responders/locales/en.yml", "config/locales/responders.en.yml" end end
Version data entries
3 entries across 3 versions & 1 rubygems