How to detect if enabled or disabled?


#1

Hello,

In my Rails 4 app I created these two helper functions:

def link_to_switch_off_miniprofiler
  link_to "OFF", "?pp=disable"
end

def link_to_switch_on_miniprofiler
  link_to "ON", "?pp=enable"
end

Is there any way to detect if MiniProfiler is currently enabled or disabled, so I can combine my two functions into one?

Thanks for any help.