Module: BlueprintOptionsSupport

Extended by:
ActiveSupport::Concern
Included in:
RailsApiBase::BaseController
Defined in:
app/controllers/concerns/blueprint_options_support.rb

Overview

app/controllers/concerns/blueprint_options_support.rb

Instance Method Summary collapse

Instance Method Details

#blueprint_optionsObject

主入口 ===



24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/controllers/concerns/blueprint_options_support.rb', line 24

def blueprint_options
  opts = {}
  self.class.blueprint_modes.each do |mode|
    method_name = "blueprint_options_for_#{mode}"
    if respond_to?(method_name, true)
      opts.merge!(send(method_name))
    else
      Rails.logger.warn("[BlueprintOptionsSupport] Unknown mode: #{mode}")
    end
  end
  opts
end