Sha256: 8a90828219299b3f0467eb458f2ee23bf168210d1e5a556cdf610fdd64b7d09c
Contents?: true
Size: 685 Bytes
Versions: 67
Compression:
Stored size: 685 Bytes
Contents
module ResourceController class FailableActionOptions extend ResourceController::Accessors scoping_reader :success, :fails alias_method :failure, :fails block_accessor :before def initialize @success = ActionOptions.new @fails = ActionOptions.new end delegate :flash, :flash_now, :after, :response, :wants, :to => :success def dup returning self.class.new do |duplicate| duplicate.instance_variable_set(:@success, success.dup) duplicate.instance_variable_set(:@fails, fails.dup) duplicate.instance_variable_set(:@before, before.dup) unless before.nil? end end end end
Version data entries
67 entries across 67 versions & 19 rubygems