Sha256: 0d411b637bc7083cbf8c36a54b696bc5a6dae1a002023279d7221bf037df692e

Contents?: true

Size: 643 Bytes

Versions: 7

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

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

      def attributes_params
        "#{singular_table_name}_params"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/responders-3.1.1/lib/generators/rails/responders_controller_generator.rb
responders-3.1.1 lib/generators/rails/responders_controller_generator.rb
responders-3.1.0 lib/generators/rails/responders_controller_generator.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/responders-3.0.1/lib/generators/rails/responders_controller_generator.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/responders-3.0.1/lib/generators/rails/responders_controller_generator.rb
responders-3.0.1 lib/generators/rails/responders_controller_generator.rb
responders-3.0.0 lib/generators/rails/responders_controller_generator.rb