I don't know exactly how you're using the code, but validates_presence_of
:user_id seems redundant. If you've setup a relationship from Group to User
then Active Record will be enforcing that validation for you. Just a thought
...
Other than that you would probably do (without seeing any of your c
> Obvious 'rails mocking associations' seemed to work for me, unless I
...make that '...Googling for ...'. Duh.
--
"One day, when he was naughty, Mr Bunnsy looked over the hedge into
Farmer Fred's field and it was full of fresh green lettuces. Mr
Bunnsy, however, was not full of lettuces. This d
On Feb 11, 2008 1:43 PM, Wes Shaddix <[EMAIL PROTECTED]> wrote:
> I've got a "group" model that has a user_id attribute and a
> validates_existence_of :user and validates_presence_of :user_id
> validations. What method(s) do I need to stub on the User mock to
> intercept those validation calls? My
I've got a "group" model that has a user_id attribute and a
validates_existence_of :user and validates_presence_of :user_id
validations. What method(s) do I need to stub on the User mock to
intercept those validation calls? My goal is to isolate the Group model
from the User model.
Thanks
Wes