translatable_menus 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5054c601fe68ad28d0c90519229cfbff37bc214e
|
4
|
+
data.tar.gz: 3d0936af8bd092d5f8e47dcb468ff5a1e7dc13e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecdc8ee79c292109f9bb6f6bef479ce0d7b808f54d1e8d553531dfee15643485f4202d6f017b495a453e94d9b3f836584924e37574f4046c593e5ca35fb8db21
|
7
|
+
data.tar.gz: 513ef41b4c77197462ddc8ce63f132a39ac5d17f00c742e1253635043d9811b27ebc71ea295d2158060c93c871123ac8fdacb542a62cb61849063b4d791acf4f
|
@@ -15,6 +15,8 @@ class TranslatableMenus::ActiveAdminIntegrator
|
|
15
15
|
end
|
16
16
|
|
17
17
|
form do |f|
|
18
|
+
f.semantic_errors *f.object.errors.keys
|
19
|
+
|
18
20
|
f.inputs do
|
19
21
|
f.input :menu_id, :as => :select, :collection => TranslatableMenus::TranslatableMenu.all
|
20
22
|
f.input :identifier
|
@@ -35,6 +37,39 @@ class TranslatableMenus::ActiveAdminIntegrator
|
|
35
37
|
|
36
38
|
f.actions
|
37
39
|
end
|
40
|
+
|
41
|
+
show do
|
42
|
+
attributes_table do
|
43
|
+
row :id
|
44
|
+
row :menu
|
45
|
+
row :identifier
|
46
|
+
row :default_title
|
47
|
+
row :default_url
|
48
|
+
row :default_active
|
49
|
+
row :sort_number
|
50
|
+
row :http_method
|
51
|
+
row :require_not_signed_in
|
52
|
+
row :require_signed_in
|
53
|
+
row :require_callbacks
|
54
|
+
row :created_at
|
55
|
+
row :updated_at
|
56
|
+
|
57
|
+
I18n.available_locales.each do |locale|
|
58
|
+
row(:locale){ locale }
|
59
|
+
|
60
|
+
I18n.with_locale locale do
|
61
|
+
row :title
|
62
|
+
row :active
|
63
|
+
row :url
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Fixes a bug where attributes wasn't assigned correctly - kaspernj
|
70
|
+
before_save do |menu|
|
71
|
+
menu.assign_attributes(permitted_params[:translatable_menu])
|
72
|
+
end
|
38
73
|
end
|
39
74
|
end
|
40
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translatable_menus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|