Displaying 2 results from an estimated 2 matches for "other_attr".
Did you mean:
other_attrs
2006 Aug 15
1
sorting attribute in list from foreign table
Hello, I currently have two tables.
table_a (
id
table_b_id
other_attrs
)
table b (
id
name
)
So table A holds an id from table B. During the listing of tuples in
table A, it lists table A''s attributes. In place of the table B id, I
check the id, and instead display the name corresponding to that id. Now
I want to be able to sort the listing of tuple...
2008 Aug 28
12
Rendering User attributes in XML
Let''s say an app has a User, and a User has many friends. Also, let''s
say the app authentication was built on the restful_authentication
plugin, and we have email and password in the Users table. The friends
controller index might look like this;
# GET /users/1/friends
# GET /users/1/friends.xml
def index
@users = @user.friends
respond_to do |format|
format.html