corn_starch 1.1.19 → 1.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/corn_starch_config.rb +10 -9
- 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: 23780760827ce0abfcc08013174834187d895537
|
4
|
+
data.tar.gz: bd4a80297bc5363f01321c835712e60bdf3066a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b305fe499274a902819cb4113843e6a192f1ef5809413eaa59bf166bf6bc1e2ad8a30bda50c7ac986d08e4a8cd238deb8bd968cb9c4360d5ec7d7ddcdaf1770
|
7
|
+
data.tar.gz: 80b034903430cce573031b7107cadc97161354b6e156cd975afebf639722c60db8c95773ddb60867d78dcc2cc52c8a4781684b6fd60f555fba1615984de9bef6
|
@@ -12,20 +12,21 @@ require 'json'
|
|
12
12
|
CORNSTARCH_CONF_FILE = "#{Rails.root}/config/corn_starch.yml"
|
13
13
|
CORNSTARCH_CONF = YAML::load_file CORNSTARCH_CONF_FILE if File.exist? CORNSTARCH_CONF_FILE
|
14
14
|
CORNSTARCH_CONF ||= {}
|
15
|
+
CORNSTARCH_CONF.deep_symbolize_keys!
|
15
16
|
|
16
17
|
######################
|
17
18
|
# Configure Defaults #
|
18
19
|
######################
|
19
20
|
|
20
21
|
# Pagination
|
21
|
-
CORNSTARCH_CONF[
|
22
|
-
CORNSTARCH_CONF[
|
23
|
-
CORNSTARCH_CONF[
|
24
|
-
CORNSTARCH_CONF[
|
25
|
-
CORNSTARCH_CONF[
|
22
|
+
CORNSTARCH_CONF[:pagination] ||= {}
|
23
|
+
CORNSTARCH_CONF[:pagination][:page_range] ||= 6
|
24
|
+
CORNSTARCH_CONF[:pagination][:records_per_page] ||= {}
|
25
|
+
CORNSTARCH_CONF[:pagination][:records_per_page][:default] ||= 10
|
26
|
+
CORNSTARCH_CONF[:pagination][:records_per_page][:opts] ||= [ 10, 25, 50, 100 ]
|
26
27
|
|
27
28
|
# Authentication
|
28
|
-
CORNSTARCH_CONF[
|
29
|
-
CORNSTARCH_CONF[
|
30
|
-
CORNSTARCH_CONF[
|
31
|
-
CORNSTARCH_CONF[
|
29
|
+
CORNSTARCH_CONF[:authentication] ||= {}
|
30
|
+
CORNSTARCH_CONF[:authentication][:user_model] ||= {}
|
31
|
+
CORNSTARCH_CONF[:authentication][:user_model][:name] ||= 'User'
|
32
|
+
CORNSTARCH_CONF[:authentication][:user_model][:uid_field] ||= 'username'
|
data/lib/corn_starch/version.rb
CHANGED