search for: subscribed_ids

Displaying 1 result from an estimated 1 matches for "subscribed_ids".

2010 Jul 13
1
NoMethodError in UsersController#show
...scribed_by(self) end Post Model (using SQLite3) : named_scope :from_users_subscribed_by, lambda { |user| subscribed_by(user) } private # Return an SQL condition for users followed by the given user. # We include the user''s own id as well. def self.subscribed_by(user) subscribed_ids = %(SELECT subscribed_id FROM subscriptions WHERE subscriber_id = :user_id) { :conditions => ["user_id IN (#{subscribed_ids}) OR user_id = :user_id", { :user_id => user }] } end -- Posted via http://www.ruby-forum.com/. -- You received this messa...