Skip to content

Commit

Permalink
addresses pentestgeek#195 edit_email Save action shows old email at t…
Browse files Browse the repository at this point in the history
…imes, fixed up attachment_location path to fixed current_path with carrierwave
  • Loading branch information
zeknox committed Jul 18, 2015
1 parent bcbca5d commit aa35622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def upload
def edit_email
@campaign = campaign_present
@attachment = Attachment.find(params[:format])
attachment_location = File.join(Rails.root.to_s, "public", "uploads", "attachment", "file", params[:format], "*")
attachment_location = @attachment.file.current_path

begin
@attachment_content = File.read(Dir.glob(attachment_location)[0])
Expand Down

0 comments on commit aa35622

Please sign in to comment.