Question

I am using Ruby on Rails 3 and I would like to know what type of return will have the following code:

@user.destroy

I need that to handle cases on success and fault in someway like this:

if @user.destroy
  puts "True"
else
  puts "false"
end

Is it possible? If so, how?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top