is_graffitiable 0.1.2 → 0.1.3
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.
- data/VERSION.yml +1 -1
- data/lib/is_graffitiable.rb +4 -1
- metadata +3 -3
data/VERSION.yml
CHANGED
data/lib/is_graffitiable.rb
CHANGED
@@ -52,7 +52,10 @@ module IsGraffitiable
|
|
52
52
|
return true unless @graffiti_map
|
53
53
|
|
54
54
|
@new_graffitis.each do |graffiti|
|
55
|
-
|
55
|
+
# ideally we want to use graffiti.valid? method. However, at this point,
|
56
|
+
# graffitiable_id and graffitiable_type hasn't been set yet. So we'll just have to do
|
57
|
+
# our own validation here
|
58
|
+
if graffiti.name.empty? or graffiti.value.empty?
|
56
59
|
errors.add("Graffiti", "is invalid")
|
57
60
|
return false
|
58
61
|
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:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darren Dao
|