focused_controller 2.0.0 → 2.0.1

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: 4520f2d723515817447f6298824b627fd5cd610d
4
- data.tar.gz: 5396abeb1c3bd9c627f67ce079bfb9113a660572
3
+ metadata.gz: 50328909d601965e71fb57ca5bbd7b1018388643
4
+ data.tar.gz: 2b620c4a51d034a1b4d2ddcad005c7ef32831e6a
5
5
  SHA512:
6
- metadata.gz: 59ea160ee59f7fe685cc2f97db55f14c7625f061ccbe9dfe0da5626affce78e65cd6a519234f2161c182d0c86a8b014a035af9d0bc1d60a391dab55247e8e606
7
- data.tar.gz: 48429585b521b53d891064926918333a4c8a8a35bf9414e6b0ac758fd496d9cb4db1e8156e4e8cbad52d70592d36cf73b832e6c0c30d3fe99483fb59857247a4
6
+ metadata.gz: 172bf02aabc5827c994fe2e6f5354bc83c9dda4f00db222dbd0360fde8e977dd08f955116ec10058339cb559491b860bb030f1bf8ffa7e77a3618c0c74b2c44c
7
+ data.tar.gz: 121d5d4ce59ad2f3866f380542fb617ee372abc4b177a9b8c2a8556e3ee82db0e3c451e60315007714a130e04e4617cb1b13f8583bc5761df59fd9a638e481f3
@@ -1,3 +1,7 @@
1
+ ## 2.0.1 ##
2
+
3
+ * Routing bug fix
4
+
1
5
  ## 2.0.0 ##
2
6
 
3
7
  * Rails 3.X and 4.0 no longer supported
@@ -25,14 +25,14 @@ module FocusedController
25
25
  private
26
26
 
27
27
  def to_option
28
- if @options[:to] && !@options[:to].respond_to?(:call)
28
+ if @options[:controller]
29
+ @options[:controller]
30
+ elsif @options[:to] && !@options[:to].respond_to?(:call)
29
31
  if @options[:to].include?('#')
30
32
  stringify_controller_and_action(*@options[:to].split('#'))
31
33
  else
32
34
  @options[:to]
33
35
  end
34
- elsif @options[:controller]
35
- @options[:controller]
36
36
  elsif @options[:action] && @scope[:controller]
37
37
  stringify_controller_and_action(@scope[:controller], @options[:action])
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module FocusedController
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -24,8 +24,9 @@ module FocusedController
24
24
  it 'creates routes that map to focused controllers' do
25
25
  route_set.draw do
26
26
  focused_controller_routes do
27
- get 'posts' => 'PostsController::Index'
28
- get 'posts/all' => 'posts#index'
27
+ get 'posts' => 'PostsController::Index'
28
+ get 'posts/all' => 'posts#index'
29
+ get 'posts/all2' => 'PostsController::Index'
29
30
 
30
31
  resources :comments do
31
32
  resources :replies
@@ -55,6 +56,7 @@ module FocusedController
55
56
  [:get, '/comments/a/omg'] => 'PostsController::Index',
56
57
  [:get, '/comments/b/omg'] => 'CommentsController::Index',
57
58
  [:get, '/admin/foo'] => 'Admin::FooController::Show',
59
+ [:get, '/posts/all2'] => 'PostsController::Index',
58
60
  }
59
61
 
60
62
  mappings.each do |(method, path), controller|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: focused_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton