eamgbq
Last Updated: February 25, 2016
·
1.945K
· dperrymorrow
37b092a324da25d53fd63d780692b174

Expose Controller Method as a helper in Rails

Ever want access to controller methods from your views in Rails? It's easy.

helper_method :format_something

def format_something
  "abc"
end

Just expose the method using "helper_method"

Say Thanks
Respond