corn_starch 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7aad1d72bcdfd4126b0c1f5127dbfbbf44f1fbd
4
- data.tar.gz: 4c9309ac8656a5cb0dd56b7f7c874fe4686f1b8c
3
+ metadata.gz: cb33db291eed5463dfbff501e3eefc04e908e5ed
4
+ data.tar.gz: e67f3902e67f611068a59417563bd18d19335680
5
5
  SHA512:
6
- metadata.gz: 9d90d47f012f0da8ba1cd5e8d80a726089b1ce59661fd1f6b9411c2872fedb77fd409750bfb950b7809cb423018fbbb1b6ecfa9149f1720de8d879259fe23204
7
- data.tar.gz: d0d3a3759049607c5044816ed778693da9379abe3274332ba08f7eaaa4c7cf5793392ad40844da7dd4a1b2b2f75e5fa0748193444ed9b0ba98a648529134dc1f
6
+ metadata.gz: 81ec8c1518251cc2b36f71d7c598b210d165c9d10946e223fbd648c8e9a66640540d6541619e83c07ae2b66f02b1b34cf972378cb7aa1de8dae28820ee4eff8f
7
+ data.tar.gz: 4eee55905b56c497b335aa1fd5888d2ea85f5b446af964440028cd538cf772903e49b854a18cea4c0a96df181e65acc616e1749b81b792031fefa3eab65df644
@@ -11,7 +11,7 @@ module CornStarch
11
11
  protect_from_forgery with: :exception
12
12
 
13
13
  # Global Filters
14
- before_filter :pagination_filter
14
+ before_filter :pagination_filter, :infiniscroll_filter
15
15
 
16
16
  # Helper Methods
17
17
  helper_method :user_model, :current_user, :is_authed, :is_self, :paginate, :notice_msg
@@ -65,6 +65,20 @@ module CornStarch
65
65
  @pagination[:recs_per_page] = (session[:pagination][:recs_per_page] || CORNSTARCH_CONF[:pagination][:records_per_page][:default]).to_i
66
66
  end
67
67
 
68
+ # InfiniScroll Filter
69
+ def infiniscroll_filter
70
+
71
+ # Create InfiniScroll
72
+ @infiniscroll ||= {}
73
+ @infiniscroll[:params] ||= {}
74
+
75
+ # Set Search
76
+ @infiniscroll[:params][:search] = params[:search] if params[:search]
77
+
78
+ # Set Records Per Page
79
+ @infiniscroll[:params][:records_per_page] = params[:records_per_page] if params[:records_per_page]
80
+ end
81
+
68
82
  ##################
69
83
  # Helper Methods #
70
84
  ##################
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse