medea 0.2.15 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.15
1
+ 0.2.16
@@ -1,6 +1,7 @@
1
1
 
2
2
  module Medea
3
3
  require 'medea/inheritable_attributes'
4
+ require 'medea/active_model_methods'
4
5
  require 'medea/list_properties'
5
6
  require 'medea/jasonobject'
6
7
  require 'medea/jasondeferredquery'
@@ -0,0 +1,22 @@
1
+ module Medea
2
+ module ActiveModelMethods
3
+ def to_model
4
+ jason_key
5
+ end
6
+
7
+ def errors
8
+ obj = Object.new
9
+ def obj.[](key) [] end
10
+ def obj.full_messages() [] end
11
+ obj
12
+ end
13
+
14
+ def persisted?
15
+ jason_state == :stale
16
+ end
17
+
18
+ def valid?
19
+ true
20
+ end
21
+ end
22
+ end
@@ -7,6 +7,7 @@ module Medea
7
7
 
8
8
  class JasonObject
9
9
 
10
+ include Medea::ActiveModelMethods
10
11
  #include JasonDB
11
12
 
12
13
  #meta-programming interface for lists
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 15
9
- version: 0.2.15
8
+ - 16
9
+ version: 0.2.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Jensen
@@ -69,6 +69,7 @@ files:
69
69
  - Rakefile
70
70
  - VERSION
71
71
  - lib/medea.rb
72
+ - lib/medea/active_model_methods.rb
72
73
  - lib/medea/inheritable_attributes.rb
73
74
  - lib/medea/jasondb.rb
74
75
  - lib/medea/jasondeferredquery.rb