search for: someexception

Displaying 2 results from an estimated 2 matches for "someexception".

Did you mean: some_exception
2009 Apr 21
2
validates_uniqueness_of
hello all, i am new to RoR programming and am struck with the functional test whole checking for uniqeness of carriers. If it is not unique,the the bin shudn''t be created.Can someone help me in correcting my code. def test_create_failure_cycle_unique begin num_bins = Bin.count post :create, {:bin => { :carrier => carriers(:A), :cycle => cycles(:one), :name =>
2006 Aug 03
3
How to override append method for related attribute?
I have a model that looks something like this: class Person < ActiveRecord::Base has_many :tasks [...] end I''d like to override/overload the append (<<) method for the tasks relational attribute such that I can perform some error checking in the context of a Person.tasks << task operation. Is there any way to do this? I wish I could do this in the context of