add documentation for each helper
This commit is contained in:
parent
5dece1ea48
commit
a5d637fcf1
3 changed files with 11 additions and 12 deletions
|
|
@ -30,4 +30,13 @@ module PathsHelper
|
|||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
# Same as redirect_to(:back) if there is a valid HTTP referer, otherwise redirect_to()
|
||||
def redirect_back_or_to(options = {}, response_status = {})
|
||||
if request.env['HTTP_REFERER']
|
||||
redirect_to :back
|
||||
else
|
||||
redirect_to options, response_status
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue