basic_search 0.0.1.alpha → 0.0.2.alpha
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGExYzY5OGY4MTdmNzQyNGMxMDYyZjliMjYxM2I4ODNjY2QzZWZmMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGUyNjc4OTFmODcxNTM5Y2M2NGQ5Y2QxYWIxMjI1YjRhNmFmZTliZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjEwNDc1ZGQ1MWM4YmNjZjEwNzc4ODM1ZmYwMjMwNTliZTk1N2RjNzZmMDg1
|
10
|
+
ZTQxNDkzYjZlYmYwM2U0YWU3N2ZhNmE1ODRkNzc2YjA2ZThiNDE2MjVlNmI2
|
11
|
+
NmNlZDU3NWY1MGRiZDg3NjkzNjg0YmFhZDdmOTk5ZjA5MWY1ZDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmZmYzgxNDliZGFlM2NjNTdiMjUyM2IxZTI1M2ZhOGE2ZjBlNzY5ZWQ1ZjVh
|
14
|
+
ZjgyODBmYTczMWRlMzU1MjIyOWFlNjkwMGZhZWE2NGJlMTNiZGVjZjEzOTYy
|
15
|
+
ZmY4ZDc1ZDgxZjUyNzRjZDQxZjJmYjJkYmM5NDYwZjIwNTc0ODI=
|
data/lib/basic_search/railtie.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module BasicSearch
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
initializer "basic_search.active_record_additions" do
|
4
|
-
|
4
|
+
ActiveRecord::Base.send :include, ActiveRecordAdditions
|
5
5
|
end
|
6
6
|
initializer "basic_search.view_helpers" do
|
7
7
|
ActionView::Base.send :include, ViewHelpers
|
data/lib/basic_search/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe 'ViewHelpers' do
|
|
8
8
|
@view_helper = @view_helper_class.new
|
9
9
|
end
|
10
10
|
|
11
|
-
describe '#
|
11
|
+
describe '#params_search_hash' do
|
12
12
|
|
13
13
|
it 'should return existing hash with key search from params' do
|
14
14
|
@view_helper.stub(:params).and_return({search: 'search_value'})
|
@@ -21,12 +21,12 @@ describe 'ViewHelpers' do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
describe '#
|
24
|
+
describe '#sortable_with_search_param_hash' do
|
25
25
|
|
26
|
-
it 'should call
|
26
|
+
it 'should call sortable_with_search_param_hash' do
|
27
27
|
@view_helper.should_receive(:params_search_hash).and_return({search: 'search_value'})
|
28
28
|
@view_helper.should_receive(:sortable).with(['column1'], 'title', {search: 'search_value'})
|
29
|
-
@view_helper.
|
29
|
+
@view_helper.sortable_with_search_param_hash(['column1'], 'title')
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|