added name back to avoid breaking

This commit is contained in:
Brian Smith 2012-11-10 23:35:56 -05:00
parent fc1a5c46f1
commit 3fc3c57e20
7 changed files with 17 additions and 5 deletions

View File

@ -10,6 +10,10 @@ node :last_name do |follower|
follower.user.last_name
end
node :name do |follower|
follower.user.name
end
node :city do |follower|
follower.user.city
end

View File

@ -4,7 +4,7 @@ attributes :id, :name, :city, :state, :country, :website, :biography, :photo_url
unless @band.users.nil? || @band.users.size == 0
child :users => :musicians do
attributes :id, :first_name, :last_name, :photo_url
attributes :id, :first_name, :last_name, :name, :photo_url
# TODO: figure out how to omit empty arrays
node :instruments do |user|

View File

@ -10,6 +10,10 @@ node :last_name do |follower|
follower.user.last_name
end
node :name do |follower|
follower.user.name
end
node :city do |follower|
follower.user.city
end

View File

@ -10,6 +10,10 @@ node :last_name do |following|
following.user.last_name
end
node :name do |follower|
follower.user.name
end
node :city do |following|
following.user.city
end

View File

@ -1,3 +1,3 @@
object @user.friends
attributes :id, :first_name, :last_name, :city, :state, :country, :email, :online
attributes :id, :first_name, :last_name, :name, :city, :state, :country, :email, :online

View File

@ -1,4 +1,4 @@
collection @users
# do not retrieve all child collections when showing a list of users
attributes :id, :first_name, :last_name, :city, :state, :country, :email, :online, :musician, :photo_url
attributes :id, :first_name, :last_name, :name, :city, :state, :country, :email, :online, :musician, :photo_url

View File

@ -1,10 +1,10 @@
object @user
attributes :id, :first_name, :last_name, :city, :state, :country, :email, :online, :photo_url, :friend_count, :follower_count, :following_count
attributes :id, :first_name, :last_name, :name, :city, :state, :country, :email, :online, :photo_url, :friend_count, :follower_count, :following_count
unless @user.friends.nil? || @user.friends.size == 0
child :friends => :friends do
attributes :id, :first_name, :last_name, :online
attributes :id, :first_name, :last_name, :name, :online
end
end