1

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.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
Tintin81
  • 9,821
  • 20
  • 85
  • 178

0 Answers0