rendering specific fields with Rails
Posted
by Tam
on Stack Overflow
See other posts from Stack Overflow
or by Tam
Published on 2010-03-12T07:51:40Z
Indexed on
2010/03/12
7:57 UTC
Read the original article
Hit count: 296
ruby-on-rails
Hi,
If I have an object say
@user
and I want to render only certain fields in it say first_name and last_name(I'm using AMF)
render :amf => @user
how do I do that?
I know I can use :select when doing the 'find' but I need to use the other field at the server side but don't want to send them with AMF to the client side and I don't want to do a second 'find'
Thanks,
Tam
© Stack Overflow or respective owner