find_or_redirect 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/find_or_redirect.rb +1 -1
- metadata +2 -2
data/lib/find_or_redirect.rb
CHANGED
@@ -8,7 +8,7 @@ module FindOrRedirect
|
|
8
8
|
instance = (opts[:name] || controller_name).singularize
|
9
9
|
redirect_target = opts[:redirect_to] || ":action => :index"
|
10
10
|
klass = (opts[:name] || controller_name).classify
|
11
|
-
finder = opts[:finder] || "#{klass}.find_by_id(params[:id])"
|
11
|
+
finder = opts[:finder] || "#{klass}.find_by_id(params[:id].to_i)"
|
12
12
|
filter_name = opts[:filter_name] || "find_#{ instance }_or_redirect"
|
13
13
|
condition = opts[:if] || true
|
14
14
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: find_or_redirect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Gauthier
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-21 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|