search for: active_record_validations_callbacks

Displaying 8 results from an estimated 8 matches for "active_record_validations_callbacks".

2013 Jun 25
1
Broken URLs to guides and APIs on rubyonrails.org
...g. My apologies if this is the wrong forum to bring this up, but I wasn''t able to find a "Contact us" link on the site. As of this writing, if I go to Google and search for "active record observer validations", the top 2 results are: http://guides.rubyonrails.org/active_record_validations_callbacks.html and http://api.rubyonrails.org/classes/ActiveRecord/Observer.html If I follow either link, I get nginx''s default 404 page. It appears both sites have been updated to refer to Rails 4, and the new URLs should be: http://guides.rubyonrails.org/v3.2.13/active_record_validations_callb...
2013 May 07
3
validates :uniqueness apparently doesn't
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] Rails 3.2.13 I have a validates ... :uniqueness constraint on one of the attributes of an ActiveRecord class. In my test suite, I set the attribute from the same attribute in a record in the fixture. I then send invalid? to the object under test. invalid? returns _false_, and the .errors object for the record shows no errors. A
2011 Apr 28
3
difference between validate and validate_on_create
i just ran into a problem with some test, and i am not exactly sure why, but the difference happened when i changed my model validation from: validate :custom_validation to: validate_on_create :custom_validation can someone give me any ideas on where in the chain the validation takes place? thanks! -- Posted via http://www.ruby-forum.com/.
2010 Jun 19
1
Is validates_presence_of() deprecated in Rails 3?
Just wondering if validates_presence_of() has been deprecated in favour of validates(:name, :presence => true) or we can prefer to use any? Asking so, since NetBeans 6.9 shows a deprecation warning, however I can not find any such deprecation message in documentations/code of Rails 3.0.0.beta4 and on web. -- You received this message because you are subscribed to the Google Groups "Ruby
2010 Dec 03
1
email notification
Hi guys, I have a feature request of email notification on forum. (Just like what this forum has) I am wondering if there is a rails plugin that does this. Any suggestions and ideas are welcome! Thx in advance. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2012 Apr 18
1
Re: validates_uniqueness_of question
Hi All, I am trying write a validation rule where I need to ensure that when a certain value is updated or created in a particular columns, a number of other columns columns are unique and that another column does not contain a certain value. I have been able to use the validates_uniqueness_of :column_a (to be updated or inserted) with , :scope => [ :column_b , :column_c , :column_d ]
2011 Jul 26
1
ActiveRecord has_many associations
Given the models Country, State, City and Person as follows. class Country < ActiveRecord::Base has_many :states end class State < ActiveRecord::Base belongs_to :country has_many :cities end class City < ActiveRecord::Base belongs_to :state has_many :people end class Person < ActiveRecord::Base belongs_to :city end Is there any way that doesn''t allow to delete
2012 Feb 01
12
date validation in rails 3
consider scenario, User model with name, birth_date fields (here birth_date is not mandatory field) inside view form birth_date is assigned as ''31/31/1985'' which is invalid ideally user object should be invalid and while save raise an error on birth_date field but that''s not happening and user object gets saved with birth_date as blank which is completely misleading.