mamechiwa 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Mamechiwa
2
2
  module Version
3
- STRING = "0.0.3"
3
+ STRING = "0.0.4"
4
4
  end
5
5
  end
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.3
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-18 00:00:00.000000000 Z
12
+ date: 2012-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord