Show More
Commit Description:
assigns users to a unique contest, small styling on contest title
Commit Description:
assigns users to a unique contest, small styling on contest title
References:
File last commit:
Show/Diff file:
Action:
app/helpers/main_helper.rb
| 18 lines
| 469 B
| text/x-ruby
| RubyLexer
|
|
r0 | module MainHelper | ||
|
r271 | def link_to_description_if_any(name, problem, options={}) | ||
if !problem.url.blank? | ||||
return link_to name, problem.url, options | ||||
elsif !problem.description_filename.blank? | ||||
basename, ext = problem.description_filename.split('.') | ||||
options[:controller] = 'tasks' | ||||
options[:action] = 'view' | ||||
options[:file] = basename | ||||
options[:ext] = ext | ||||
return link_to name, options | ||||
else | ||||
return '' | ||||
end | ||||
end | ||||
|
r0 | end | ||