Permalink
Browse files

fix, maybe

  • Loading branch information...
1 parent 6f4112a commit 5ad08a177f25d75fde174b5f2797e4ca071552e7 @kyohsuke committed Oct 10, 2012
Showing with 33 additions and 0 deletions.
  1. +20 −0 arb_indexes.gemspec
  2. +10 −0 lib/arb_indexes/base.rb
  3. +3 −0 lib/arb_indexes/version.rb
View
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'arb_indexes/version'
+
+Gem::Specification.new do |gem|
+ gem.name = 'arb_indexes'
+ gem.version = ArbIndexes::VERSION
+ gem.authors = ['Keisuke Kawahara']
+ gem.email = ['kyohsuke@conafie.jp']
+ gem.description = %q{get indexes from Model}
+ gem.summary = %q{get indexes from Model}
+ gem.homepage = 'https://github.com/kyohsuke/arb_indexes'
+
+ gem.files = `git ls-files`.split($/)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.require_paths = ['lib']
+
+ gem.add_development_dependency 'activerecord', '>= 3.0.0'
+end
View
@@ -0,0 +1,10 @@
+require 'active_support'
+
+module ArbIndexes
+ extend ActiveSupport::Concern
+ def indexes
+ connection.indexes(table_name)
+ end
+end
+
+ActiveRecord::Base.send(:include, ArbIndexes)
@@ -0,0 +1,3 @@
+module ArbIndexes
+ VERSION = '0.0.0'
+end

0 comments on commit 5ad08a1

Please sign in to comment.