Method: ApplicationHelper#post_history_share_link

Defined in:
app/helpers/application_helper.rb

#post_history_share_link(post, history, index) ⇒ String

Get a shareable link to a point in the specified post’s history.

Parameters:

  • post (Post)

    The post in question.

  • history (ActiveRecord::Collection<PostHistory>)

    The post’s history.

  • index (Integer)

    The index of the history event to link to.

Returns:

  • (String)


172
173
174
# File 'app/helpers/application_helper.rb', line 172

def post_history_share_link(post, history, index)
  post_history_url(post, anchor: history.size - index)
end