mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-24 23:06:42 +00:00
ORM update in readme
This commit is contained in:
parent
8edf55ef46
commit
a9587ba142
10
README.rdoc
10
README.rdoc
@ -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
|
* 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
|
* Supports timezone handling
|
||||||
|
|
||||||
@ -45,18 +45,14 @@ This creates configuration initializer and locale files. In the initializer, you
|
|||||||
|
|
||||||
ValidatesTimeliness.setup do |config|
|
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 ]
|
# config.extend_orms = [ :active_record ]
|
||||||
|
|
||||||
end
|
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.
|
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:
|
== Usage:
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user