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 +4 -4
- data/app/controllers/corn_starch/corn_starch_controller.rb +15 -1
- data/lib/corn_starch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb33db291eed5463dfbff501e3eefc04e908e5ed
|
4
|
+
data.tar.gz: e67f3902e67f611068a59417563bd18d19335680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
##################
|
data/lib/corn_starch/version.rb
CHANGED