This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit fb7313de763ccb32f3ddb99d89db740bf4a050a4
tree 70bb9a67213a2fce18e4637f4778a7d2e940a870
parent 45a2e0ce28b9fce8c8bc81aa42406e2ba5dd4b8a
tree 70bb9a67213a2fce18e4637f4778a7d2e940a870
parent 45a2e0ce28b9fce8c8bc81aa42406e2ba5dd4b8a
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Feb 26 09:11:50 -0800 2009 | |
| |
MIT-LICENSE | Wed Apr 16 22:09:18 -0700 2008 | |
| |
README.txt | Wed Apr 16 22:09:18 -0700 2008 | |
| |
init.rb | Wed Apr 16 22:09:18 -0700 2008 | |
| |
lib/ | Thu Feb 26 09:12:06 -0800 2009 |
README.txt
= active-form plugin for Rails active-form is a plugin that makes it easy to have model objects that support the ActiveRecord Validations but are not backed by database tables. The plugin is designed to make it possible to use the ActiveForm derived classes in a very similar manner to the ActiveRecord::Base derived objects. Originally described at; http://www.realityforge.org/articles/2005/12/02/validations-for-non-activerecord-model-objects == How To Define An ActiveForm Object class Search < ActiveForm attr_accessor :text validates_length_of :text, :maximum=>30 end == How To Use ActiveForm Object In Controller class NavigatorController < ApplicationController def search @search = Search.new(params[:search]) if @search.valid? ...do search here... end end end == How To Use ActiveForm Object In View <%= start_form_tag(:action => 'search') %> <%= error_messages_for('search') %> <%= text_field('search', 'text', {"maxlength" => 30}) %> <button type="submit">Save</button> <%= end_form_tag %> == Details License: Released under the MIT license. Latest Version: http://www.realityforge.org/svn/public/code/active-form/trunk/ == Credits Peter Donald <peter at realityforge dot org>. Dae San Hwang for fix to work with Rails 1.1. Trevor Squires for suggestion to use Reloadable::Subclasses rather than dispatcher hack for Rails 1.1. Tim Lucas for patch to allow bulk addition of attributes. Geoff Schmidt for adding support for Callbacks. Sean Christman for attributes getter. Jack Christensen for attributes setter.







