Hi I have a helper module that I use in my views, I'd like to be able to get the source file location of the file that I call the helper method on. Ideally I'd like it to work like this:
/views/posts/index.hmtl.erb
<%= my_method ' method_param' %>
my_helper.rb
module MyHelper
def my_method(method_param)
location = self.some_way_of_finding_caller_loaction+method_param
end
end
Which would then render to:
"/views/posts/index.hmtl.erb method_param"
in my view.
Is there anyway for me to do this?