couchrest_model_config 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.2.1
2
+ -- looking promising. this should fix it once and for all.
3
+
1
4
  v0.2.0
2
5
  -- ok, new tack - forget all the other attempts to fix the rails reloading problem. this should fix it.
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -38,12 +38,10 @@ module CouchRest
38
38
  end
39
39
 
40
40
  def for(m)
41
- m = m.to_s.camelize.constantize unless m.class == Class
42
41
  model_configs(m)
43
42
  end
44
43
 
45
44
  def method_missing(model, *args, &block)
46
- model = model.to_s.camelize.constantize
47
45
  return model_configs(model) unless block
48
46
  configure_model model, &block
49
47
  end
@@ -62,7 +60,9 @@ module CouchRest
62
60
  end
63
61
 
64
62
  def model_configs(model=nil)
63
+ model = model.to_s.to_sym if model
65
64
  @model_configs ||= {}
65
+ puts @model_configs.inspect
66
66
  return (@model_configs[model] ||= Model.new model) if model
67
67
  end
68
68
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchrest_model_config
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Parker