mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
add documentation for each helper
This commit is contained in:
parent
5dece1ea48
commit
a5d637fcf1
3 changed files with 11 additions and 12 deletions
|
|
@ -1,4 +1,5 @@
|
|||
module ApplicationHelper
|
||||
# Including custom made helpers
|
||||
include DateTimeHelper
|
||||
include FormatHelper
|
||||
include EventsHelper
|
||||
|
|
@ -34,15 +35,6 @@ module ApplicationHelper
|
|||
render 'shared/dynamic_association', association_name: association_name, title: title, f: form_builder, hint: options[:hint]
|
||||
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
|
||||
|
||||
def tracks(conference)
|
||||
all = conference.program.tracks.map {|t| t.name}
|
||||
first = all[0...-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue