mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 01:30:12 +01:00
Merge pull request #206 from mmozuras/refactor_unless_blanks_into_presents
Refactor unless blanks into presents
This commit is contained in:
commit
e2eb31cfcc
15 changed files with 25 additions and 25 deletions
|
|
@ -334,7 +334,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