Module: Plugins::PapertrailHelper

Defined in:
app/helpers/plugins/papertrail_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) paper_trail_version_tag(paper_trail_version)



3
4
5
6
# File 'app/helpers/plugins/papertrail_helper.rb', line 3

def paper_trail_version_tag(paper_trail_version)
  return nil if paper_trail_version.nil?
  "Revision #{paper_trail_version.index}" 
end


8
9
10
# File 'app/helpers/plugins/papertrail_helper.rb', line 8

def papertrail_link_tag(object)
  (:li, link_to('Papertrail', papertrail_path(object_type: object.class, object_id: object.id))) if object.respond_to?(:versions) 
end