Skip to content

Instantly share code, notes, and snippets.

@avdi
Created November 27, 2011 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avdi/1398474 to your computer and use it in GitHub Desktop.
Save avdi/1398474 to your computer and use it in GitHub Desktop.
Remove namespace from routing helpers etc.
def self.model_name
# remove "bit_bindery" prefix from routing helpers etc.
ActiveModel::Name.new(self, self.parent, self.name.demodulize)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment