Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit b3fcf2fa3c55584c6cb23d2195fbdc2647cc84cd 1 parent 7ec91d4
David Heinemeier Hansson dhh authored
2  activerecord/lib/active_record/validations.rb
View
@@ -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)
2  railties/lib/rails_generator/generators/components/scaffold/USAGE
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.