Removed update taggable ids method
This commit is contained in:
parent
ec2fe965d0
commit
ca8c895ac8
|
@ -7,11 +7,11 @@ class Tagging
|
|||
belongs_to :tag
|
||||
belongs_to :taggable, polymorphic: true
|
||||
|
||||
before_destroy :update_taggable_tag_ids
|
||||
# after_destroy :update_taggable_tag_ids
|
||||
|
||||
private
|
||||
# private
|
||||
|
||||
def update_taggable_tag_ids
|
||||
self.taggable.remove_id(self.tag.id)
|
||||
end
|
||||
# def update_taggable_tag_ids
|
||||
# self.taggable.remove_id(self.tag.id)
|
||||
# end
|
||||
end
|
|
@ -125,7 +125,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
delete_out_invalid_date_from_params
|
||||
respond_to do |format|
|
||||
if @bulletin.update_attributes(params[:bulletin])
|
||||
@bulletin.get_bulletin_tags
|
||||
|
||||
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('bulletin.update_bulletin_success')) }
|
||||
format.js { render 'toggle_enable' }
|
||||
|
|
|
@ -66,15 +66,6 @@ class Bulletin
|
|||
self.category
|
||||
end
|
||||
|
||||
def get_bulletin_tags
|
||||
@tags = self.tags.collect{|t| t.id.to_s}.uniq
|
||||
tag = []
|
||||
tag << @tags
|
||||
self.tagged_ids << @tags
|
||||
tags = self.tagged_ids.delete(tag.first)
|
||||
save
|
||||
end
|
||||
|
||||
def share_item
|
||||
Item.first(conditions:{name: 'announcement'})
|
||||
end
|
||||
|
|
Reference in New Issue