Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Commit

Permalink
Allow attachment view when ticket can be viewed. Temp disable reply t…
Browse files Browse the repository at this point in the history
…o others tickets
  • Loading branch information
Frank Groeneveld committed Aug 1, 2014
1 parent f1f9977 commit 023edf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/controllers/attachments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class AttachmentsController < ApplicationController
def show
@attachment = Attachment.find(params[:id])

authorize! :read, @attachment.attachable
if @attachment.attachable_type == 'Ticket'
authorize! :read, @attachment.attachable
else
authorize! :read, @attachment.attachable.ticket
end

begin
if params[:format] == 'thumb'
Expand Down
2 changes: 1 addition & 1 deletion app/models/reply.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Reply < ActiveRecord::Base
scope :chronologically, -> { order(:id) }

def notify
self.content += "\n\n" + self.user.signature.to_s
self.content += '<br /><br />' + self.user.signature.to_s

mail = yield(self)

Expand Down

0 comments on commit 023edf5

Please sign in to comment.