Following are the 1-to-M models:
class FotoGossip < ActiveRecord::Base has_many :uploads attr_accessible :published_at, ... end class Upload < ActiveRecord::Base belongs_to :foto_gossip end
Now I want the Uploads.all with the condition :published_at NOT NULL of the corresponding upload's parent model?