-
Notifications
You must be signed in to change notification settings - Fork 0
Add ability to inherit from the classes based on ActiveRecord::BaseWithoutTable
License
mhorbul/active_record_base_without_table
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
= ActiveRecordBaseWithoutTable If you find this plugin useful, please consider a donation to show your support! http://www.paypal.com/cgi-bin/webscr?cmd=_send-money Email address: jonathan.viney@gmail.com == Instructions Get the power of ActiveRecord models, including validation, without having a table in the database. class Contact < ActiveRecord::BaseWithoutTable column :name, :string, "unknown" column :email_address, :string column :message, :text validates_presence_of :name, :email_address, :string end class AnotherContact < Contact column :name, :string, "another unknown" column :login, :string validates_presence_of :login end This model can be used just like a regular model based on a table, except it will never be saved to the database. There is a good blog post available on the plugin: http://www.kangarooit.com/developer_blog/2007/02/email-form-validation-in-ruby-on-rails.php Any bugs, questions, comments please feel free to email me: jonathan.viney@gmail.com
About
Add ability to inherit from the classes based on ActiveRecord::BaseWithoutTable
Resources
License
Stars
Watchers
Forks
Releases
No releases published