module Dry::Rails::Features::ControllerHelpers
Controller helpers
@api public
Public Instance Methods
container()
click to toggle source
Return the application container
@return [Dry::Rails::Container]
@api public
# File lib/dry/rails/features/controller_helpers.rb, line 34 def container Railtie.container end
resolve(key)
click to toggle source
Return a component from the application container
@example
def index users = resolve("users.index").(safe_params[:query]) render json: users end
@param key [Symbol, String] The component key
@return [Object]
@raise Dry::Container::Error
@api public
# File lib/dry/rails/features/controller_helpers.rb, line 25 def resolve(key) container[key] end