Archive for the 'software' Category

Should ActiveRecord add validations based on associations defined in the models?

class User < ActiveRecord::Base
has_many :posts
end

class Post < ActiveRecord::Base
belongs_to :user
end

If i create an instance of a post with a user_id that does not exist in the Users table, I wish ActiveRecord threw up a validation error on saving this instance [...]

Saturday, July 8th, 2006 | No Comments

Have been busy recently comparing Rails 1.1’s integration testing and WATIR and selenium for end-to-end testing a rails application.
The testing scenario is that the webserver is running on a remote Linux box in US, to which we have ssh access.
And we are testing the application from India. So we cannot run the browser on that [...]

Wednesday, April 26th, 2006 | No Comments