Created
May 11, 2015 15:33
-
-
Save rodrigoargumedo/754055655925c65838ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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