corn_starch 1.1.20 → 1.1.21

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: 23780760827ce0abfcc08013174834187d895537
4
- data.tar.gz: bd4a80297bc5363f01321c835712e60bdf3066a9
3
+ metadata.gz: 297383f34b6145554c6f05258d3a1b8352d911db
4
+ data.tar.gz: de6071b28f21cf57d1d8b5d8baeefc16bdb68133
5
5
  SHA512:
6
- metadata.gz: 5b305fe499274a902819cb4113843e6a192f1ef5809413eaa59bf166bf6bc1e2ad8a30bda50c7ac986d08e4a8cd238deb8bd968cb9c4360d5ec7d7ddcdaf1770
7
- data.tar.gz: 80b034903430cce573031b7107cadc97161354b6e156cd975afebf639722c60db8c95773ddb60867d78dcc2cc52c8a4781684b6fd60f555fba1615984de9bef6
6
+ metadata.gz: 8234f99b90f4371e90a212bd17a79f8ed7a8dbe30c79e32984c3d575abfae3ed94b725a3b9eaba4cdcef37693ca7b7d5699a9f2a4d22bb06e51c787a03083f77
7
+ data.tar.gz: 6ad237ce5a9d90cdb0bec49a4ac5e8b23492306369c28a743bf06e43c84c8427ba1e8f714ae6bf72f026fbce9282a8672f6940e9c0f2b419ff9e28ba7be26151
@@ -107,7 +107,7 @@ module CornStarch
107
107
  @pagination[:pg_count] = 0
108
108
 
109
109
  # Acquire Records per Page from Session / Configuration
110
- @pagination[:recs_per_page] = (session[:pagination][:recs_per_page] || CORNSTARCH_CONF['pagination']['records_per_page']['default']).to_i
110
+ @pagination[:recs_per_page] = (session[:pagination][:recs_per_page] || CORNSTARCH_CONF[:pagination][:records_per_page][:default]).to_i
111
111
  end
112
112
 
113
113
  ##################
@@ -116,12 +116,12 @@ module CornStarch
116
116
 
117
117
  # User Model
118
118
  def user_model
119
- Kernel.const_get CORNSTARCH_CONF['authentication']['user_model']['name']
119
+ Kernel.const_get CORNSTARCH_CONF[:authentication][:user_model][:name]
120
120
  end
121
121
 
122
122
  # UID Field
123
123
  def uid_field
124
- CORNSTARCH_CONF['authentication']['user_model']['uid_field']
124
+ CORNSTARCH_CONF[:authentication][:user_model][:uid_field]
125
125
  end
126
126
 
127
127
  # Current User
@@ -151,9 +151,9 @@ module CornStarch
151
151
  @pagination[:pg_count] = (total / @pagination[:recs_per_page]) + (((total % @pagination[:recs_per_page]) > 0) ? 1 : 0)
152
152
 
153
153
  # Compute Page Range
154
- range_start = current - (CORNSTARCH_CONF['pagination']['page_range'] / 2)
154
+ range_start = current - (CORNSTARCH_CONF[:pagination][:page_range] / 2)
155
155
  range_start = 0 if range_start < 0
156
- range_end = current + (CORNSTARCH_CONF['pagination']['page_range'] / 2)
156
+ range_end = current + (CORNSTARCH_CONF[:pagination][:page_range] / 2)
157
157
  range_end = @pagination[:pg_count] - 1 if range_end >= @pagination[:pg_count]
158
158
 
159
159
  # Create Page Links
@@ -14,7 +14,7 @@
14
14
  <div class='form-group'>
15
15
  <%= label_tag :records_per_page, 'Records per page', class: 'control-label' %>
16
16
  <div class='input-group'>
17
- <%= select_tag :records_per_page, options_for_select(CORNSTARCH_CONF['pagination']['records_per_page']['opts'], @pagination[:recs_per_page]), class: 'form-control' %>
17
+ <%= select_tag :records_per_page, options_for_select(CORNSTARCH_CONF[:pagination][:records_per_page][:opts], @pagination[:recs_per_page]), class: 'form-control' %>
18
18
  </div>
19
19
  </div>
20
20
  <%= submit_tag 'Go', name: nil, class: 'btn btn-primary' %>
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.1.20'
2
+ VERSION = '1.1.21'
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.1.20
4
+ version: 1.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse