Skip to content

Commit

Permalink
Merge pull request #348 from mzazrivec/dont_invoke_get_tagdata_for_no…
Browse files Browse the repository at this point in the history
…n_taggable_objects

Don't invoke get_tagdata() for non-taggable objects
  • Loading branch information
h-kataria authored Feb 13, 2017
2 parents c8f2e07 + 7ee5456 commit 020b283
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def download_summary_pdf
@record = identify_record(params[:id])
yield if block_given?
return if record_no_longer_exists?(@record)
get_tagdata(@record)
get_tagdata(@record) if @record.try(:taggings)
@display = "download_pdf"
set_summary_pdf_data
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/mixins/generic_show_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def show_download
end

def show_main
get_tagdata(@record)
get_tagdata(@record) if @record.try(:taggings)
drop_breadcrumb({:name => ui_lookup(:models => self.class.model.to_s),
:url => "/#{controller_name}/show_list?page=#{@current_page}&refresh=y"},
true)
Expand Down

0 comments on commit 020b283

Please sign in to comment.