mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
fix several deprecation warnings
truncate wants explicit :length => number and :omission calling a partial from a js requires to explicitly pass the variable i.e. :todo => @todo instead of rails doing it implicitly
This commit is contained in:
parent
6da4282558
commit
198f3240b8
10 changed files with 27 additions and 27 deletions
|
|
@ -20,12 +20,12 @@ module ProjectsHelper
|
|||
def project_next_prev
|
||||
html = ''
|
||||
unless @previous_project.nil?
|
||||
project_name = truncate(@previous_project.name, 40, "...")
|
||||
project_name = truncate(@previous_project.name, :length => 40, :omission => "...")
|
||||
html << link_to_project(@previous_project, "« #{project_name}")
|
||||
end
|
||||
html << ' | ' if @previous_project && @next_project
|
||||
unless @next_project.nil?
|
||||
project_name = truncate(@next_project.name, 40, "...")
|
||||
project_name = truncate(@next_project.name, :length => 40, :omission => "...")
|
||||
html << link_to_project(@next_project, "#{project_name} »")
|
||||
end
|
||||
html
|
||||
|
|
@ -34,12 +34,12 @@ module ProjectsHelper
|
|||
def project_next_prev_mobile
|
||||
html = ''
|
||||
unless @previous_project.nil?
|
||||
project_name = truncate(@previous_project.name, 40, "...")
|
||||
project_name = truncate(@previous_project.name, :length => 40, :omission => "...")
|
||||
html << link_to_project_mobile(@previous_project, "5", "« 5-#{project_name}")
|
||||
end
|
||||
html << ' | ' if @previous_project && @next_project
|
||||
unless @next_project.nil?
|
||||
project_name = truncate(@next_project.name, 40, "...")
|
||||
project_name = truncate(@next_project.name, :length => 40, :omission => "...")
|
||||
html << link_to_project_mobile(@next_project, "6", "6-#{project_name} »")
|
||||
end
|
||||
html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue