material_raingular 0.0.2.4.4.alpha → 0.0.2.4.5.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/material_raingular/version.rb +1 -1
- data/lib/tasks/material_raingular.rake +2 -2
- 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: b5a5f9737006aa3371d74bcec0231aeec1307f37
|
4
|
+
data.tar.gz: 5bfd3f4751a932f16fe612c6aa28da7a5a388268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c09ed706d0e034e77163d498f26a126caf7a2977c920936734df7a5babce66a1570cd843b67499b8bbd8bbbb8554e18fc46d7b1f050ea427c498660fd8b4b10
|
7
|
+
data.tar.gz: 44e89f23786aed0342ee56e74cf0deea25825889d1bc9fb74a2a2ee1ae87f28721892bb5e6a4f08bbadcdbe8a46f99d7e1138cc0903384954535b3fa68ae08e4
|
@@ -13,13 +13,13 @@ namespace :material_raingular do
|
|
13
13
|
(route.parts - [:id, :format]).each do |parent|
|
14
14
|
action = route.defaults[:action].to_sym
|
15
15
|
method = [:index, :show].include?(action) ? '' : "#{action}_"
|
16
|
-
method += route.defaults[:controller].send(action == :index ? :pluralize : :singularize)
|
16
|
+
method += route.defaults[:controller].send(action == :index ? :pluralize : :singularize).gsub(/[^0-9A-Za-z]/, '_')
|
17
17
|
controllers[parent[0..-4].pluralize] ||= {}
|
18
18
|
controllers[parent[0..-4].pluralize][:parent_model_name_and_format_symbol] ||= []
|
19
19
|
controllers[parent[0..-4].pluralize][:parent_model_name_and_format_symbol] |= route.parts
|
20
20
|
controllers[parent[0..-4].pluralize][method] = {url: route.path.spec.to_s.gsub('(.:format)',''), method: route.constraints[:request_method].inspect.delete('/^$')}
|
21
21
|
end
|
22
|
-
controllers[route.defaults[:controller]][route.defaults[:action]] = {url: route.path.spec.to_s.gsub('(.:format)',''), method: route.constraints[:request_method].inspect.delete('/^$')}
|
22
|
+
controllers[route.defaults[:controller]][route.defaults[:action].gsub(/[^0-9A-Za-z]/, '_')] = {url: route.path.spec.to_s.gsub('(.:format)',''), method: route.constraints[:request_method].inspect.delete('/^$')}
|
23
23
|
end
|
24
24
|
end
|
25
25
|
controllers.each do |controller,routes|
|