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
class ExampleProfileController < MetalController | |
# assuming a route something like: | |
# /profile/:user_id.json | |
def show | |
prof = Profile.find params['user_id'] | |
if prof | |
respond_with prof | |
else | |
response_error 'not_found', "User id of #{params['user_id']} has not been found." | |
end |