xhive 1.0.6.pre → 1.0.7.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Xhive
2
- VERSION = "1.0.6.pre"
2
+ VERSION = "1.0.7.pre"
3
3
  end
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(controller_name, action)
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
- controller_name = self.name.gsub(/Controller|Xhive|::/, '')
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.6.pre
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-30 00:00:00.000000000 Z
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: -2204793199243602054
226
+ hash: 230345765792334857
227
227
  required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  none: false
229
229
  requirements: