diff options
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/USAGE | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 9987c0631d..03a71f095b 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -297,8 +297,6 @@ module ActiveRecord # * <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) diff --git a/railties/lib/rails_generator/generators/components/scaffold/USAGE b/railties/lib/rails_generator/generators/components/scaffold/USAGE index d1f29ad63c..1b6eaa2dd9 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/USAGE +++ b/railties/lib/rails_generator/generators/components/scaffold/USAGE @@ -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. |