class Avo::ApplicationController
def resource_name
Get the pluralized resource name for this request
def resource_name return params[:resource_name] if params[:resource_name].present? return controller_name if controller_name.present? begin request.path .match(/\/?#{Avo::App.root_path.delete('/')}\/resources\/([a-z1-9\-_]*)\/?/mi) .captures .first rescue end end