casey_jones 0.0.105 → 0.0.106

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,10 @@ module LoadBehind
26
26
  set_controller_var 'container', get_controller_var('container') || 'main_container'
27
27
  end
28
28
 
29
+ def find(id)
30
+ self.model_instance ||= base.lookup(id)
31
+ end
32
+
29
33
  private
30
34
 
31
35
  def set_controller_var(name, value)
@@ -131,6 +131,7 @@ END
131
131
  end
132
132
 
133
133
  def lookup(params)
134
+ str = params.kind_of?(Hash) ? params[:id] : params
134
135
  str = params[:id]
135
136
  if str.match(/\D/)
136
137
  named(str)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: casey_jones
3
3
  version: !ruby/object:Gem::Version
4
- hash: 205
4
+ hash: 203
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 105
10
- version: 0.0.105
9
+ - 106
10
+ version: 0.0.106
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyler Gannon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-22 00:00:00 -07:00
18
+ date: 2010-07-23 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21