mamechiwa 0.0.6 → 0.0.7

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.6"
3
+ STRING = "0.0.7"
4
4
  end
5
5
  end
data/lib/mamechiwa.rb CHANGED
@@ -40,9 +40,13 @@ module Mamechiwa
40
40
 
41
41
  hash = value
42
42
  hash = ActiveSupport::JSON.decode(value) if value.is_a?(String)
43
- write_attribute("#{field}", @mame_embedded.merge(hash).to_json)
44
43
 
45
- @mame_embedded.refresh
44
+ if @mame_embedded
45
+ write_attribute("#{field}", @mame_embedded.merge(hash).to_json)
46
+ @mame_embedded.refresh
47
+ else
48
+ write_attribute("#{field}", hash.to_json)
49
+ end
46
50
  end
47
51
 
48
52
  define_method "#{field}" do
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.6
4
+ version: 0.0.7
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-30 00:00:00.000000000 Z
12
+ date: 2012-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord