Skip to content

WebOnRails

Month: October 2007

Single Table Inheritance validates_uniqueness_of Problem

Published on October 26, 2007

Consider a case of STI where: Now try following at console: This will let you create three records in users table with same name, validates_uniqueness_of written in User class has no effect on it. validates_uniqueness_of automatically scoped with class names, that means it will not let you create two managers with same name or two … Continue reading Single Table Inheritance validates_uniqueness_of Problem

Follow me on

Categories

Tags

ActiveRecord apache attachment_fu aws bash capistrano deploy edge rails elixir elixirlang Error Exception Exception Handelling full text search funday gems git hosting installation linux migrations mod_rewrite Notification pound Rails Rails4 rails_plugin rake ROR ruby rubygems Rubyonrails s3 SCP script server sftp STI Tips transfer Trick tricks ubuntu Ultrasphinx validations

© WebOnRails. Powered by WordPress & Krusze Theme.