Trying to display a list of categories that have posts. Sounds simple but i'm a little stuck. Similar to this
ActiveRecord find all parents that have associated children
class Category < ActiveRecord::Base
has_many :posts
end
class Post < ActiveRecord::Base
belongs_to :category
end
Can you please help. I tried named scope but breaks the app.