Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix, maybe

  • Loading branch information...
commit 5ad08a177f25d75fde174b5f2797e4ca071552e7 1 parent 6f4112a
@kyohsuke authored
View
20 arb_indexes.gemspec
@@ -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
10 lib/arb_indexes/base.rb
@@ -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)
View
3  lib/arb_indexes/version.rb
@@ -0,0 +1,3 @@
+module ArbIndexes
+ VERSION = '0.0.0'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.