Manish Shrivastava
Manish Shrivastava

Reputation: 32050

Unless AND (&&) in ruby on rails

I want to use

unless @a && @b
   -- data here
end

I don't want to use

 if !(@a && @b)

If you have any suggestion, as unless and is not working.

Upvotes: 0

Views: 1792

Answers (1)

andy
andy

Reputation: 2399

You solved the question yourself really. Use brackets :)

unless (@a && @b)
    #...
end

Upvotes: 5

Related Questions