First:
application.html.erb
<%= content_for :title %>
posts/index.html.erb # for example
<% content_for :title do %>
Awesome title
<% end %>
More information here: http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#method-i-content_for
Second:
class Post
CONTACTME = "If you're interested, please <a href='/contacts/new'>please contact me</a>".html_safe
end
application.html.erb
<%= Post::CONTACTME %>