Permalink
Browse files

Updating documentation

  • Loading branch information...
1 parent 79a8018 commit 65e57ea7f9aed6a79ddd1f249064cf2b81ceeee2 @baphled committed Apr 23, 2012
Showing with 20 additions and 11 deletions.
  1. +12 −10 README.md
  2. +8 −1 lib/acceptable_model.rb
View
@@ -52,6 +52,7 @@ class exposes.
The cool thing about the rel attribute is that we can define our own, doing
this couldn't be easier. Re-open the defined class and simple create your own
+Re-open the defined class and simple create your own
relationship.
``
class AcceptableModel::Artist
@@ -122,6 +123,17 @@ exposes the following response.
All this from a few lines of code :D
+AcceptableModel define a range of rel values but we should also be able to
+create our own rel types, we could do this via the config method as follows:
+
+``
+ AcceptableModel.config do |config|
+ config.relationships = %w{self contains part_of parent child}
+ end
+``
+
+This will prefix all of our rel attribuetes with the string above
+
TODO
====
@@ -167,13 +179,3 @@ something like this:
end
``
-This will prefix all of our rel attribuetes with the string above
-
-We should also be able to create our own rel types, we could do this via the
-config method as follows:
-
-``
- AcceptableModel.config do |config|
- config.relationships = %w{self contains part_of parent child}
- end
-``
View
@@ -39,9 +39,16 @@ def class
module HATEOS
class << self
- attr_accessor :relationship_types
+ #
+ # Configuration variables
+ #
attr_accessor :relationships
+ #
+ # A complete list of relationship types to look for
+ #
+ attr_accessor :relationship_types
+
def configure
yield self
true

0 comments on commit 65e57ea

Please sign in to comment.