Skip to content

Instantly share code, notes, and snippets.

@DCarper
Created April 14, 2011 14:26
Show Gist options
  • Save DCarper/919573 to your computer and use it in GitHub Desktop.
Save DCarper/919573 to your computer and use it in GitHub Desktop.
def prefix_template
def self.default_template_name(action_name = self.action_name)
if action_name
action_name = action_name.to_s
if action_name.include?('/') && template_path_includes_controller?(action_name)
action_name = strip_out_controller(action_name)
end
end
"admin/#{self.controller_path}/#{action_name}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment