Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use ternary instead explicit return.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
commit c91a13f8f557cc1d21fccb5f964d50438cd60a52 1 parent ac6e944
@miloops miloops authored spastorino committed
View
3  activerecord/lib/active_record/associations/association_collection.rb
@@ -357,8 +357,7 @@ def include?(record)
return false unless record.is_a?(@reflection.klass)
return include_in_memory?(record) unless record.persisted?
load_target if @reflection.options[:finder_sql] && !loaded?
- return @target.include?(record) if loaded?
- exists?(record)
+ loaded? ? @target.include?(record) : exists?(record)
end
def proxy_respond_to?(method, include_private = false)
Please sign in to comment.
Something went wrong with that request. Please try again.