Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding monkey patching on README

  • Loading branch information...
commit 053011c55c7ff0536873a9c56dadd33f52e5deba 1 parent 5ad08a1
Keisuke Kawahara authored

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. +14 0 README.md
14 README.md
Source Rendered
@@ -15,6 +15,20 @@ kick it on rails console
15 15 User.indexes
16 16 ```
17 17
  18 +## Monkey Patching if you don't need to bundle
  19 +touch config/initializers/arb_indexes.rb and put it.
  20 +
  21 +```ruby
  22 +module ActiveRecord
  23 + class Base
  24 + class << self
  25 + def indexes
  26 + connection.indexes(table_name)
  27 + end
  28 + end
  29 + end
  30 +end
  31 +```
18 32
19 33 ## See Also
20 34 http://stackoverflow.com/questions/1683948/activerecord-finding-existing-table-indexes

0 comments on commit 053011c

Please sign in to comment.
Something went wrong with that request. Please try again.