mamechiwa 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mamechiwa/version.rb +1 -1
- data/lib/mamechiwa.rb +6 -0
- metadata +2 -2
data/lib/mamechiwa/version.rb
CHANGED
data/lib/mamechiwa.rb
CHANGED
@@ -59,6 +59,12 @@ module Mamechiwa
|
|
59
59
|
unless @mame_embedded
|
60
60
|
errors.add("#{field}", "#{self.class.mame_group_field} is unregistered type.")
|
61
61
|
else
|
62
|
+
if (unregistered_attributes = (@mame_embedded.keys.map(&:to_sym) - @mame_embedded.mame_attrs)).size > 0
|
63
|
+
unregistered_attributes.each do |unregistered_attribute|
|
64
|
+
errors.add("#{field}[#{unregistered_attribute}]", "is unregistered attribute.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
62
68
|
if !@mame_embedded.valid?
|
63
69
|
@mame_embedded.errors.each do |k, v|
|
64
70
|
errors.add("#{field}[#{k}]", v)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mamechiwa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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: 2012-05-
|
12
|
+
date: 2012-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|