instance method end

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.0.20

Signature

end(key=nil, object=nil)

This will supply contents for around and after filters, but not before filters (for the backward pass).

Parameters

key opt = nil
object opt = nil
Source
# File activesupport/lib/active_support/callbacks.rb, line 235
      def end(key=nil, object=nil)
        return if key && !object.send("_one_time_conditions_valid_#{@callback_id}?")

        if @kind == :around || @kind == :after
          # if condition    # after_save :filter_name, :if => :condition
          #   filter_name
          # end
          if @kind == :after
            [@compiled_options[0], @filter, @compiled_options[1]].compact.join("\n")
          else
            "end"
          end
        end
      end

Defined in activesupport/lib/active_support/callbacks.rb line 235 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Callbacks::Callback

Type at least 2 characters to search.

↑↓ navigate · open · esc close