Show More
Commit Description:
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
Commit Description:
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml * bootrapize the user_admin * now considering user.enabled * tidy up route
File last commit:
Show/Diff file:
Action:
app/helpers/main_helper.rb | 19 lines | 505 B | text/x-ruby | RubyLexer |
pramook
initial commit...
r0 module MainHelper
Jittat Fakcharoenphol
imports task description as pdf
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'
Jittat Fakcharoenphol
added contest problem access control
r282 options[:action] = 'download'
options[:id] = problem.id
Jittat Fakcharoenphol
imports task description as pdf
r271 options[:file] = basename
options[:ext] = ext
return link_to name, options
else
return ''
end
end
pramook
initial commit...
r0 end