Add after_create to queue an updateserviceusers job on service create. We'll see how it works
This commit is contained in:
parent
0ae9af74f3
commit
3e8f455cbc
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,9 @@ class Service < ActiveRecord::Base
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
has_many :service_users
|
has_many :service_users
|
||||||
|
after_create do
|
||||||
|
Resque.enqueue(Job::UpdateServiceUsers, self.id) if s.respond_to? :save_friends
|
||||||
|
end
|
||||||
|
|
||||||
def public_message(post, length, url = "")
|
def public_message(post, length, url = "")
|
||||||
url = "" if post.respond_to?(:photos) && post.photos.count == 0
|
url = "" if post.respond_to?(:photos) && post.photos.count == 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue