Skip to content

Instantly share code, notes, and snippets.

@rodrigoargumedo
Created May 11, 2015 15:33
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 rodrigoargumedo/754055655925c65838ae to your computer and use it in GitHub Desktop.
Save rodrigoargumedo/754055655925c65838ae to your computer and use it in GitHub Desktop.
# Let's say I want to return a route with id (Devise) without having
# Rails to complain that Mongoid needs to a id of some number.
# So, I have controller containing profiles in the files.
# It goes like..
ProfilesController < ApplicationController
def index
@user = User.find(params[:id])
end
# GET /profile/
# .. Snipped for brevity.
end
# Is this the right way to do it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment