xhive 1.0.6.pre → 1.0.7.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xhive/router/base.rb +3 -0
- data/lib/xhive/version.rb +1 -1
- data/lib/xhive/widgify.rb +2 -3
- metadata +3 -3
data/lib/xhive/router/base.rb
CHANGED
@@ -19,12 +19,15 @@ module Xhive
|
|
19
19
|
# Returns: the route definition. e.g. 'pages/:id/show'.
|
20
20
|
#
|
21
21
|
def self.route_for(controller, action)
|
22
|
+
url = ''
|
22
23
|
routes = normalized_routes
|
23
24
|
url = routes.to_a.select {|route| route[:end_point] == "#{controller}##{action}"}.first.fetch(:path)
|
24
25
|
url = url.gsub('(.:format)', '')
|
25
26
|
url
|
26
27
|
rescue
|
27
28
|
Rails.logger.error "#{Error.class.name}:#{controller}##{action}"
|
29
|
+
ensure
|
30
|
+
return url
|
28
31
|
end
|
29
32
|
|
30
33
|
private
|
data/lib/xhive/version.rb
CHANGED
data/lib/xhive/widgify.rb
CHANGED
@@ -26,7 +26,7 @@ module Xhive
|
|
26
26
|
# Returns: the route definition. e.g. 'pages/:id/show'.
|
27
27
|
#
|
28
28
|
def route_for(action)
|
29
|
-
Xhive::Router::Base.route_for(
|
29
|
+
Xhive::Router::Base.route_for(controller_path, action)
|
30
30
|
end
|
31
31
|
|
32
32
|
# Private: builds the tag name for a given action.
|
@@ -36,8 +36,7 @@ module Xhive
|
|
36
36
|
# Returns: the tag name.
|
37
37
|
#
|
38
38
|
def tag_name_for(action)
|
39
|
-
|
40
|
-
tag_name = "#{controller_name}#{action.capitalize}"
|
39
|
+
tag_name = "#{controller_name.capitalize}#{action.capitalize}"
|
41
40
|
end
|
42
41
|
|
43
42
|
# Private: adds the action to the widgets list and sets the layout to false.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xhive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -223,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
223
223
|
version: '0'
|
224
224
|
segments:
|
225
225
|
- 0
|
226
|
-
hash:
|
226
|
+
hash: 230345765792334857
|
227
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
228
|
none: false
|
229
229
|
requirements:
|