You probably want `options = fields.pop if fields.last.is_a?(Hash)`, then you don't need the `if options …` block of code.