Skip to content

Instantly share code, notes, and snippets.

@joshnabbott
Forked from aguilarsoto/gist:560940
Created September 1, 2010 16:16
Show Gist options
  • Select an option

  • Save joshnabbott/560942 to your computer and use it in GitHub Desktop.

Select an option

Save joshnabbott/560942 to your computer and use it in GitHub Desktop.
user_controller.rb
def show
respond_to do |format|
format.json { render :json => @user.to_json(:methods => [:avatar_url])}
end
end
user.rb
def avatar_url
self.avatar.url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment