custom_query_methods 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39867c06a422f20d4e29a237483bcddb348406847feff44d8f5af6850adee9be
4
- data.tar.gz: c692235378f6b4909e599e3e7ab3871a71a5953ae6889153ddaa6d2bcfb22610
3
+ metadata.gz: 964a480f2c501ac2a253957c35d6e39d3a10c2834dede6297d28eabe5f928105
4
+ data.tar.gz: cd4cbf511a444d3f0f1b9d0b8f8e5bdcdc2db1cd6a559e2273eda31bcd235934
5
5
  SHA512:
6
- metadata.gz: f0d366c4f70bbf559cf9ba3ec8d609d1e24dfd75fe652708a61f09396bedfcded50c417f4115cde91fdb4d48a91bfe9ae01c2d1a125a6f2703a9079e67e3ddfd
7
- data.tar.gz: d76a0b9760aa364ee8975597660b05deb12ec9cf4453bae2701fc58a007d0948dd6568cc76b5c6697be816a21ef99b269fa8b3cf55e219400181164d1dfbd98f
6
+ metadata.gz: 7e05304933a072a7c578728eca02edff47d597dac46a95739584f4a60c7ae10c83c33bbd977b2ae359c9129f43a6725fce1c2c7b3347cab17813d4bd5bd85aa8
7
+ data.tar.gz: cd30077473a31b08049d5ddd1370e3414f84d995bb10dd61e6fa62498a4de2c152564cb116e557dfaeff931e719ec2894bdc4477e1e8469d2cd69e3f2f7e4d71
Binary file
Binary file
@@ -1,9 +1,7 @@
1
1
  module CustomQueryMethods
2
2
  module ActiveRecordExtension
3
3
  def custom_where(*args)
4
- def custom_where(*args)
5
- where('name LIKE ?', "%#{args.first}%")
6
- end
4
+ where('name LIKE ?', "%#{args.first}%")
7
5
  end
8
6
  end
9
7
  end
@@ -0,0 +1,11 @@
1
+ require_relative 'active_record_extension'
2
+
3
+ module CustomQueryMethods
4
+ class Railtie < Rails::Railtie
5
+ initializer 'custom_query_methods.include_in_active_record' do
6
+ ActiveSupport.on_load :active_record do
7
+ ActiveRecord::Base.send(:include, CustomQueryMethods::ActiveRecordExtension)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module CustomQueryMethods
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require "custom_query_methods/version"
2
2
  require "custom_query_methods/active_record_extension"
3
+ require 'custom_query_methods/railtie'
3
4
 
4
5
  module CustomQueryMethods
5
6
  ActiveRecord::Base.include ActiveRecordExtension
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: custom_query_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - tsotne
@@ -57,9 +57,12 @@ files:
57
57
  - custom_query_methods-0.1.1.gem
58
58
  - custom_query_methods-0.1.2.gem
59
59
  - custom_query_methods-0.1.3.gem
60
+ - custom_query_methods-0.1.4.gem
61
+ - custom_query_methods-0.1.5.gem
60
62
  - custom_query_methods.gemspec
61
63
  - lib/custom_query_methods.rb
62
64
  - lib/custom_query_methods/active_record_extension.rb
65
+ - lib/custom_query_methods/railtie.rb
63
66
  - lib/custom_query_methods/version.rb
64
67
  homepage: http://example.com
65
68
  licenses: