Q:

ruby if statement one line

if_condition ? if_statement : else_statement
1
@item.property = params[:property] ? true : false
0

New to Communities?

Join the community