Ruby ternary operator if else - how make ternary? if @user.skill.present? @skill = @user.skill else @skill = skill.new end @skill = @user.skill || skill.new if value of @user.skill if nil, asign next value( skill.new) @skill. Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment