creddit/app/helpers/subcreddits_helper.rb

10 lines
231 B
Ruby
Raw Normal View History

2015-08-12 16:45:30 -04:00
module SubcredditsHelper
def subcreddit_name(subcreddit)
if subcreddit
content_for(:title) { link_to subcreddit.name, subcreddit }
else
content_for(:title) { link_to 'frontpage', root_path }
end
end
end