find_or_redirect 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. data/lib/find_or_redirect.rb +1 -1
  2. metadata +2 -2
@@ -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.0
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-04 00:00:00 -05:00
12
+ date: 2010-01-21 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15