Fixed docs for scaffolding generator #1303 [thijs@vandervossen.net]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 7ec91d46
......@@ -297,8 +297,6 @@ def validates_confirmation_of(*attr_names)
# * <tt>on</tt> - Specifies when this validation is active (default is :save, other options :create, :update)
# * <tt>accept</tt> - Specifies value that is considered accepted. The default value is a string "1", which
# makes it easy to relate to an HTML checkbox.
#
def validates_acceptance_of(*attr_names)
configuration = { :message => ActiveRecord::Errors.default_error_messages[:accepted], :on => :save, :allow_nil => true, :accept => "1" }
configuration.update(attr_names.pop) if attr_names.last.is_a?(Hash)
......
......@@ -25,7 +25,7 @@ Example:
database and browse to http://localhost/bank/ -- voila, you're on Rails!
Modules Example:
./script/generate controller 'admin/credit_card' suspend late_fee
./script/generate scaffold CreditCard 'admin/credit_card' suspend late_fee
This will generate a CreditCard model and CreditCardController controller
in the admin module.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册