Class: ActiveRecord::Relation
- Inherits:
-
Object
- Object
- ActiveRecord::Relation
- Defined in:
- lib/active_record/simple_explain/relation.rb
Instance Method Summary collapse
Instance Method Details
#explain ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_record/simple_explain/relation.rb', line 9 def explain adapter = ActiveRecord::Base.connection.class.to_s.split(/::/).last exp = proc { SimpleExplain.new(adapter, to_sql).display } if method_defined? :explain_org if adapter == 'sqlite3' exp.call else explain_org end else exp.call end end |
#explain_org ⇒ Object
7 |
# File 'lib/active_record/simple_explain/relation.rb', line 7 alias_method :explain_org, :explain |