Is it possible in Rails to have code like this?
if ...
skip_to_section_1
end
if ...
skip_to_section_2
end
...code...
begin_section_1...
begin_section_2...
For clarity, the real code structure is considerably more complex than above so just using more if statements makes the code uglier and introduces redundancy. Any help is much appreciated.
Couldn’t you just throw the sections of logic into a couple methods? I assume that if the first
ifevaluates to true, then you want both sections to run. If that was was you intended, then this would be how I would do it: