Sha256: 462ba7b709ae0d1e4bb2382c9c09c82fa25212553929a5f4b55f245176cde2b3

Contents?: true

Size: 532 Bytes

Versions: 8

Compression:

Stored size: 532 Bytes

Contents

require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator'

module Rails
  module Generators
    class RespondersControllerGenerator < ScaffoldControllerGenerator
      source_root File.expand_path("../templates", __FILE__)

      protected

      def flash?
        if defined?(ApplicationController)
          !ApplicationController.responder.ancestors.include?(Responders::FlashResponder)
        else
          Rails.application.config.responders.flash_keys.blank?
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
responders-1.0.0.rc lib/generators/rails/responders_controller_generator.rb
responders-0.9.3 lib/generators/rails/responders_controller_generator.rb
responders-0.9.2 lib/generators/rails/responders_controller_generator.rb
responders-0.9.1 lib/generators/rails/responders_controller_generator.rb
responders-0.9.0 lib/generators/rails/responders_controller_generator.rb
responders-0.8.0 lib/generators/rails/responders_controller_generator.rb
responders-0.7.0 lib/generators/rails/responders_controller_generator.rb
responders-0.6.5 lib/generators/rails/responders_controller_generator.rb