Permalink
Browse files

README fix to show off the correct usage of the plugin

  • Loading branch information...
jdunphy committed Dec 24, 2008
1 parent 3f431bf commit 7bb6eff768d843c7a95336d2f231b0c78df18e0e
Showing with 7 additions and 1 deletion.
  1. +7 −1 README
View
8 README
@@ -106,7 +106,13 @@ end
Thats quite a bit of code. With sequel_polymorphic you can now do:
class Note < Sequel::Model
- is :polymorphic, :as => :attachable
+ is :polymorphic
+ one_to_many :assets, :as => :attachable
+end
+
+class Asset < Sequel::Model
+ is :polymorphic
+ many_to_one :attachable, :polymorphic => true
end
voila!

0 comments on commit 7bb6eff

Please sign in to comment.