rocket_cms 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/config/locales/en.rs.yml +1 -1
- data/config/locales/ru.models.yml +2 -2
- data/config/locales/ru.rs.yml +1 -1
- data/lib/rocket_cms/engine.rb +14 -0
- data/lib/rocket_cms/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: f9a1a374ed07e41e31e16fe482b7e34270f55daa
|
4
|
+
data.tar.gz: 62713481e980987b9cbd0ce8238c21da693dc0e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c07a4605e3c25dc1d5f81e6eca9554e60726201810f18a7f34a5ebac47ad76285d8d7edea0fce21c49a610b92aa7b2b912f408abeec660bb1721bef88b81034
|
7
|
+
data.tar.gz: 37b66e4e5e38a4806610177b89d5877420af1c178adf22d9cb09bc178d0c13341be7bb76d3ac1320f8a307418e25fbf863751f9306fe49d5f131e21060d1d0ae
|
data/Gemfile.lock
CHANGED
data/config/locales/en.rs.yml
CHANGED
@@ -7,7 +7,7 @@ en:
|
|
7
7
|
with_final_slash: "should begin with a slash"
|
8
8
|
page_url_regex: "Regular expression to check if page is current"
|
9
9
|
final_in_menu: "This link is also displayed in menu"
|
10
|
-
no_contact_info: "Please enter your phone or email so we could contact you."
|
10
|
+
no_contact_info: "^Please enter your phone or email so we could contact you."
|
11
11
|
map: 'Map'
|
12
12
|
edit: Edit
|
13
13
|
send: Send
|
@@ -73,12 +73,12 @@ ru:
|
|
73
73
|
contact_message:
|
74
74
|
attributes:
|
75
75
|
email:
|
76
|
-
invalid_email_address:
|
76
|
+
invalid_email_address: "^Неверный e-mail"
|
77
77
|
activerecord:
|
78
78
|
<<: *mongoid
|
79
79
|
|
80
80
|
activemodel:
|
81
81
|
errors:
|
82
82
|
messages:
|
83
|
-
invalid_email_address:
|
83
|
+
invalid_email_address: "^Неверный e-mail"
|
84
84
|
|
data/config/locales/ru.rs.yml
CHANGED
@@ -7,7 +7,7 @@ ru:
|
|
7
7
|
with_final_slash: "c начальным слешем"
|
8
8
|
page_url_regex: "Регулярное выражение, по которому определяется является ли этот пункт активным"
|
9
9
|
final_in_menu: "В меню сразу отдается конечная ссылка"
|
10
|
-
no_contact_info: "
|
10
|
+
no_contact_info: "^Пожалуйста введите ваш е-мейл или телефон чтобы мы могли связаться с вами."
|
11
11
|
map: 'Карта'
|
12
12
|
edit: Редактировать
|
13
13
|
send: Отправить
|
data/lib/rocket_cms/engine.rb
CHANGED
@@ -25,6 +25,20 @@ module RocketCMS
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
initializer 'rocket_cms.simple_form_error_msg' do
|
29
|
+
# https://github.com/rs-pro/russian/blob/master/lib/russian/active_model_ext/custom_error_message.rb
|
30
|
+
module SimpleForm
|
31
|
+
module Components
|
32
|
+
module Errors
|
33
|
+
protected
|
34
|
+
def errors_on_attribute
|
35
|
+
object.errors[attribute_name].map {|m| m.sub(/^\^/, '')}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
28
42
|
config.after_initialize do
|
29
43
|
# trigger autoload so models are registered in Mongoid::Elasticearch
|
30
44
|
RocketCMS.configuration.search_models.map(&:constantize)
|
data/lib/rocket_cms/version.rb
CHANGED