2015-12-11 15:26:51 -05:00
|
|
|
# helpers/subcreddits__helper.rb
|
2015-08-12 16:45:30 -04:00
|
|
|
module SubcredditsHelper
|
2015-12-11 15:26:51 -05:00
|
|
|
def subcreddit_name(subcreddit = '')
|
|
|
|
if subcreddit.blank?
|
|
|
|
link = link_to 'frontpage', root_path
|
2015-08-12 16:45:30 -04:00
|
|
|
else
|
2015-12-11 15:26:51 -05:00
|
|
|
link = link_to subcreddit.name, subcreddit
|
2015-08-12 16:45:30 -04:00
|
|
|
end
|
2015-12-11 15:26:51 -05:00
|
|
|
|
|
|
|
content_for(:title) { link }
|
2015-08-12 16:45:30 -04:00
|
|
|
end
|
|
|
|
end
|