Make reshares helper a little more readable

This commit is contained in:
Raphael Sofaer 2011-08-05 10:52:33 -07:00
parent f63ba2c557
commit 0d864935cd

View file

@ -9,9 +9,18 @@ module ResharesHelper
def reshare_link(post) def reshare_link(post)
if reshare?(post) if reshare?(post)
link_to t("reshares.reshare.reshare_original"), reshares_path(:root_guid => post.root.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.root.author.name) link_to t("reshares.reshare.reshare_original"),
reshares_path(:root_guid => post.root.guid),
:method => :post,
:remote => true,
:confirm => t('reshares.reshare.reshare_confirmation', :author => post.root.author.name)
else else
link_to t("reshares.reshare.reshare", :count => post.reshares.size), reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.author.name) link_to t("reshares.reshare.reshare",
:count => post.reshares.size),
reshares_path(:root_guid => post.guid),
:method => :post,
:remote => true,
:confirm => t('reshares.reshare.reshare_confirmation', :author => post.author.name)
end end
end end
end end