is_graffitiable 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/graffiti.rb +1 -0
  3. metadata +3 -3
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 3
3
+ :patch: 4
4
4
  :major: 0
data/lib/graffiti.rb CHANGED
@@ -5,6 +5,7 @@ class Graffiti < ActiveRecord::Base
5
5
  validates_presence_of :value
6
6
  validates_presence_of :graffitiable_id
7
7
  validates_presence_of :graffitiable_type
8
+ validates_uniqueness_of :name, :scope => [:graffitiable_id, :graffitiable_type]
8
9
  def to_s
9
10
  name
10
11
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: is_graffitiable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darren Dao