KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm having some trouble getting scoping to work correctly in Rails. My models: class User < ActiveRecord::Base default_scope :conditions => 'users.deleted_at IS NULL' class Feed < ActiveRecord::Base belongs_to :user, :foreign_key => :author_id When I call the following: feeds = Feed.includes(:user) I want to skip over the default_scope for users. so I tried: feeds = Feed.unscoped.includes(:user) But this is not removing the scope from users. How can I get this to work?
Tags (comma-separated)
Save Edits
Cancel