Given that this part of code works,
if @sprint.nil?
redirect_to sprints_path
else
@sprint.define_state
end
I don't understand why this part of code doesn't:
@sprint.nil? ? redirect_to sprints_path : @sprint.define_state
I don't know why in the second example the program goes immediately into the else
block. Could someone explain how it is possible?