ORM update in readme

This commit is contained in:
Adam Meehan 2010-09-22 12:51:59 +10:00
parent 8edf55ef46
commit a9587ba142

View File

@ -14,7 +14,7 @@ If you a looking for the old version for Rails 2.x go here[http://github.com/adz
* Adds ActiveModel validation for dates, times and datetimes
* Should work with any ORM using ActiveModel
* Should work with any ORM using ActiveModel (currently ActiveRecord and Mongoid supported)
* Supports timezone handling
@ -45,18 +45,14 @@ This creates configuration initializer and locale files. In the initializer, you
ValidatesTimeliness.setup do |config|
# Add plugin to supported ORMs (only :active_record for now)
# Add plugin to supported ORMs (:active_record, :mongoid)
# config.extend_orms = [ :active_record ]
end
By default the plugin extends ActiveRecord if present. Currently ActiveRecord is the only ORM included for extension. If you wish to extend
By default the plugin extends ActiveRecord if present. Currently ActiveRecord and Mongoid are supported for extension. If you wish to extend
another ORM then look at the {wiki page}[http://github.com/adzap/validates_timeliness/wiki/ORM-Support] for more information.
To extend other ORMs is pretty straight forward. It's matter of hooking into a couple of methods, being the attribute method generation and
timezone handling of validated attributes. However, the plugin must support the ActiveModel validations system. If you extend an ORM
successfully, please send me a pull request to add the shim to the plugin or let me know where to find it.
== Usage: