mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Refactor "unless blank?" into "if present?"
This commit is contained in:
parent
4ca6114b76
commit
25e764b21a
15 changed files with 27 additions and 27 deletions
|
|
@ -30,10 +30,10 @@ module ProjectsHelper
|
|||
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")
|
||||
end
|
||||
|
||||
|
||||
def project_summary(project)
|
||||
project_description = ''
|
||||
project_description += Tracks::Utils.render_text( project.description ) unless project.description.blank?
|
||||
project_description += Tracks::Utils.render_text( project.description ) if project.description.present?
|
||||
project_description += content_tag(:p,
|
||||
"#{count_undone_todos_phrase(p)}. #{t('projects.project_state', :state => project.state)}".html_safe
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue