method
method_missing
rails latest stable - Class:
ActiveRecord::Associations::AssociationProxy
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.
method_missing(method, *args)private
Forwards any missing method call to the target.
# File activerecord/lib/active_record/associations/association_proxy.rb, line 212
def method_missing(method, *args)
if load_target
unless @target.respond_to?(method)
message = "undefined method `#{method.to_s}' for \"#{@target}\":#{@target.class.to_s}"
raise NoMethodError, message
end
if block_given?
@target.send(method, *args) { |*block_args| yield(*block_args) }
else
@target.send(method, *args)
end
end
end Related methods
- Instance methods
- ===
- aliased_table_name
- conditions
- inspect
- loaded
- loaded?
- proxy_owner
- proxy_reflection
- proxy_respond_to?
- proxy_target
- reload
- reset
- respond_to?
- send
- sql_conditions
- target
- target=
- Class methods
- new
- Protected methods
-
dependent? -
interpolate_and_sanitize_sql -
interpolate_sanitized_sql -
merge_options_from_reflection! -
sanitize_sql -
set_belongs_to_association_for -
with_scope - Private methods
-
flatten_deeper -
foreign_key_present -
load_target -
method_missing -
owner_quoted_id -
raise_on_type_mismatch -
set_inverse_instance -
we_can_set_the_inverse_on_this?