mcfly 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,11 +34,17 @@ module McFly
34
34
  end
35
35
 
36
36
  def mcfly_validates_uniqueness_of(*attr_names)
37
- # add :obsoleted_dt to the uniqueness scope
37
+ # Set MCFLY_UNIQUENESS class constant to the args passed.
38
+ # This is useful for introspection. FIXME: won't work if
39
+ # mcfly_validates_uniqueness_of is called multiple times on
40
+ # the same class.
41
+ self.const_set(:MCFLY_UNIQUENESS, attr_names)
38
42
 
39
43
  attr_names << {} unless attr_names.last.is_a?(Hash)
40
44
 
41
45
  attr_names.last[:scope] ||= []
46
+
47
+ # add :obsoleted_dt to the uniqueness scope
42
48
  attr_names.last[:scope] << :obsoleted_dt
43
49
 
44
50
  # Set uniqueness error message if not set. FIXME: need to
data/lib/mcfly/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mcfly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails