Sha256: c9478f78bc5a96ff2b557557cea20b61717c6d390133b0b60c35d3f540adf0f5
Contents?: true
Size: 766 Bytes
Versions: 12
Compression:
Stored size: 766 Bytes
Contents
rad.controller class ControllerCaller < Rad::Conveyors::Processor def call # prepare response = workspace.response.must_be.defined klass = workspace.class.must_be.present raise "The controller class #{klass} must be a Rad::Controller::Abstract!" unless klass.is? Rad::Controller::Abstract controller = workspace.controller = klass.new action = workspace.action = workspace.method_name format = workspace.params.format # call workspace.content = catch :halt do controller.run_callbacks :action, method: action do # call controller controller.send action # render view controller.render action: action end end end end
Version data entries
12 entries across 12 versions & 1 rubygems