Skip to content

Commit

Permalink
Allow lax includes to be turned on by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
jturkel committed Mar 5, 2014
1 parent bf860fa commit b867435
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/activerecord_lax_includes.rb
Expand Up @@ -24,7 +24,12 @@ def filtered_records_by_reflection(association)
end

def lax_includes_enabled?
!!Thread.current[:active_record_lax_includes_enabled]
result = Thread.current[:active_record_lax_includes_enabled]
if result.nil?
result = Rails.configuration.respond_to?(:active_record_lax_includes_enabled) &&
Rails.configuration.active_record_lax_includes_enabled
end
result
end
end

Expand Down

0 comments on commit b867435

Please sign in to comment.