Skip to content

Commit

Permalink
improve import message
Browse files Browse the repository at this point in the history
  • Loading branch information
leword committed May 8, 2010
1 parent 776d5d3 commit f6cf92d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/card/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class Import < HTML

def import_content
DiffPatch
cardnames = CardMerger.load( self.content )
self.content = "updated #{cardnames.join(", ")}"
messages = CardMerger.load( self.content )
self.content = "#{messages.join("<br/>")}"
end
end
end
5 changes: 3 additions & 2 deletions lib/diff_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def load data

c = Card.find_or_create :name => cardname, :type => data['type']
n_updates = RevisionMerger.new(c).load( data['revisions'] )
Rails.logger.info("Import updated #{cardname} with #{n_updates} revisions")
cardname
msg = "updated #{cardname} with #{n_updates} new revisions"
Rails.logger.info("Import: " + msg)
msg
end
end
end
Expand Down

0 comments on commit f6cf92d

Please sign in to comment.