mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 13:28:49 +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
|
|
@ -338,7 +338,7 @@ class ProjectsController < ApplicationController
|
|||
default_context_name = p['default_context_name']
|
||||
p.delete('default_context_name')
|
||||
|
||||
unless default_context_name.blank?
|
||||
if default_context_name.present?
|
||||
default_context = current_user.contexts.where(:name => default_context_name).first_or_create
|
||||
p['default_context_id'] = default_context.id
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue