class HouseBuyersController < ... def my_method # How could I get here the relevant model name, i.e. \"HouseBuyer\" ? end end
The accepted solution did not work for me as my controller and model was namespaced. Instead, I came up with the following method:
def controllers_model (self.class.name.split('::')[0..-2] << controller_name.classify).join('::') end