Skip to content

Commit

Permalink
Disable "offsets" method in diff-views [#174]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarrasch committed May 25, 2012
1 parent 672e5ae commit 38aa5cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/gitorious/diff/inline_table_callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def comments=(comments)
end

def addline(line)
line.define_singleton_method(:offsets) { [] } # TODO
%Q{<tr data-line-num-tuple="#{line.offsets.join('-')}"
class="changes line-#{line.new_number}">} +
render_comment_count(line) +
Expand All @@ -26,6 +27,7 @@ def addline(line)
end

def remline(line)
line.define_singleton_method(:offsets) { [] } # TODO
%Q{<tr data-line-num-tuple="#{line.offsets.join('-')}"
class="changes line-#{line.old_number}">} +
render_comment_count(line) +
Expand Down Expand Up @@ -78,6 +80,7 @@ def render_comment_count(line)
end

def render_comments_for(line)
line.define_singleton_method(:offsets) { [] } # TODO
return "" unless @comment_callback
return "" if @comment_callback.comment_count_ending_on_line(line).zero?
%Q{<div class="diff-comments"
Expand Down

0 comments on commit 38aa5cb

Please sign in to comment.