11 Apr '12, 11pm

しかし例外クラスを指定する方法は無さそうだな…。save! は、errors[] が空でなければ必ず RecordInvalid を投げる実装になっている印象。http://t.co/wFvIkMy6

Database constraints and/or stored procedures make the validation mechanisms database-dependent and can make testing and maintenance more difficult. However, if your database is used by other applications, it may be a good idea to use some constraints at the database level. Additionally, database-level validations can safely handle some things (such as uniqueness in heavily-used tables) that can be difficult to implement otherwise. Client-side validations can be useful, but are generally unreliable if used alone. If they are implemented using JavaScript, they may be bypassed if JavaScript is turned off in the user’s browser. However, if combined with other techniques, client-side validation can be a convenient way to provide users with immediate feedback as they use your site. Controller-level validations can be tempting to use, but often become unwieldy and difficult to t...

Full article: http://guides.rubyonrails.org/active_record_validations_c...

Tweets

"Observers" class UserObserver < ActiveRecord::...

guides.rubyonrails.org 11 Apr '12, 11pm

Database constraints and/or stored procedures make the validation mechanisms database-dependent and can make testing and m...

Ruby on Rails Guides: Active Record Validations...

guides.rubyonrails.org 13 Apr '12, 4pm

Database constraints and/or stored procedures make the validation mechanisms database-dependent and can make testing and m...

"4.3.2 Options for has_many"

guides.rubyonrails.org 11 Apr '12, 11pm

is a connection between two Active Record models. Associations are implemented using macro-style calls, so that you can de...

Ruby on Rails Guides: Performance Testing Rails...

guides.rubyonrails.org 10 Apr '12, 8am

# routes.rb root :to => 'home#index' resources :posts # home_controller.rb class HomeController < ApplicationController de...

omgbloglol - Improved validations in Rails 3:

omgbloglol.com 30 Mar '12, 8am

Improved validations in Rails 3 Quite sorry about not getting another post up sooner; I’ve been very busy lately with a fe...