mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Fasterer: Parallel assignment is slower
Parallel assignment is slower than sequential assignment. Only got the low hanging fruit. There are some functions that have multiple return values. Fixing this needs more refactoring.
This commit is contained in:
parent
9f81e1a5c3
commit
5092b388fe
4 changed files with 63 additions and 47 deletions
|
|
@ -25,7 +25,8 @@ module ProjectsHelper
|
|||
end
|
||||
|
||||
def project_next_prev_mobile
|
||||
prev_project,next_project= "", ""
|
||||
prev_project = ""
|
||||
next_project = ""
|
||||
prev_project = content_tag(:li, link_to_project_mobile(@previous_project, "5", @previous_project.shortened_name), :class=>"prev") if @previous_project
|
||||
next_project = content_tag(:li, link_to_project_mobile(@next_project, "6", @next_project.shortened_name), :class=>"next") if @next_project
|
||||
return content_tag(:ul, "#{prev_project}#{next_project}".html_safe, :class=>"next-prev-project")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue