changed the delete to a destroy on retraction, also removed a puts
This commit is contained in:
parent
16e8ecc72c
commit
97e00f9ee3
3 changed files with 2 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ class Post < ActiveRecord::Base
|
||||||
cattr_reader :per_page
|
cattr_reader :per_page
|
||||||
@@per_page = 10
|
@@per_page = 10
|
||||||
|
|
||||||
before_destroy :propogate_retraction
|
after_destroy :propogate_retraction
|
||||||
|
|
||||||
def user_refs
|
def user_refs
|
||||||
self.post_visibilities.count
|
self.post_visibilities.count
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Retraction
|
||||||
def perform receiving_user
|
def perform receiving_user
|
||||||
Rails.logger.debug "Performing retraction for #{post_guid}"
|
Rails.logger.debug "Performing retraction for #{post_guid}"
|
||||||
self.target.unsocket_from_user receiving_user if target.respond_to? :unsocket_from_user
|
self.target.unsocket_from_user receiving_user if target.respond_to? :unsocket_from_user
|
||||||
self.target.delete
|
self.target.destroy
|
||||||
target.post_visibilities.delete_all
|
target.post_visibilities.delete_all
|
||||||
Rails.logger.info("event=retraction status=complete type=#{self.type} guid=#{self.post_guid}")
|
Rails.logger.info("event=retraction status=complete type=#{self.type} guid=#{self.post_guid}")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ describe ApplicationHelper do
|
||||||
start_url ="http://www.youtube.com/watch?v=" + video_id
|
start_url ="http://www.youtube.com/watch?v=" + video_id
|
||||||
url = start_url + "&a=GxdCwVVULXdvEBKmx_f5ywvZ0zZHHHDU&list=ML&playnext=1"
|
url = start_url + "&a=GxdCwVVULXdvEBKmx_f5ywvZ0zZHHHDU&list=ML&playnext=1"
|
||||||
res = markdownify(url)
|
res = markdownify(url)
|
||||||
pp res
|
|
||||||
res.match(/href="<a/).should be_nil
|
res.match(/href="<a/).should be_nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue