fixed delete co author relation bug

This commit is contained in:
Rueshyna 2013-03-05 12:41:42 +08:00
parent 430981a534
commit f6272728d5
2 changed files with 4 additions and 4 deletions

View File

@ -55,9 +55,9 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController
private private
def reset_co_author_relation def reset_co_author_relation
co_author = ConferenceCoAuthor.where(co_author_relations_id: @co_author_relation.id) co_author = ConferenceCoAuthor.where(conference_co_author_relations_id: @conference_co_author_relation.id)
co_author.map do |c| co_author.map do |c|
c.update_attributes(co_author_relations_id: nil) c.update_attributes(conference_co_author_relations_id: nil)
end end
end end
end end

View File

@ -55,9 +55,9 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl
private private
def reset_co_author_relation def reset_co_author_relation
co_author = JournalCoAuthor.where(co_author_relations_id: @co_author_relation.id) co_author = JournalCoAuthor.where(journal_co_author_relations_id: @journal_co_author_relation.id)
co_author.map do |c| co_author.map do |c|
c.update_attributes(co_author_relations_id: nil) c.update_attributes(journal_co_author_relations_id: nil)
end end
end end
end end