diff --git a/app/views/api_bands/follower_index.rabl b/app/views/api_bands/follower_index.rabl index c58c0c9ab..fb957fa93 100644 --- a/app/views/api_bands/follower_index.rabl +++ b/app/views/api_bands/follower_index.rabl @@ -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 diff --git a/app/views/api_bands/show.rabl b/app/views/api_bands/show.rabl index 1091dfd88..6b7864cbf 100644 --- a/app/views/api_bands/show.rabl +++ b/app/views/api_bands/show.rabl @@ -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| diff --git a/app/views/api_users/follower_index.rabl b/app/views/api_users/follower_index.rabl index 0d82e3b56..7b7b7b985 100644 --- a/app/views/api_users/follower_index.rabl +++ b/app/views/api_users/follower_index.rabl @@ -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 diff --git a/app/views/api_users/following_index.rabl b/app/views/api_users/following_index.rabl index 12afb07f4..60a776fac 100644 --- a/app/views/api_users/following_index.rabl +++ b/app/views/api_users/following_index.rabl @@ -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 diff --git a/app/views/api_users/friend_index.rabl b/app/views/api_users/friend_index.rabl index 9a2f27e74..47bbd619b 100644 --- a/app/views/api_users/friend_index.rabl +++ b/app/views/api_users/friend_index.rabl @@ -1,3 +1,3 @@ object @user.friends -attributes :id, :first_name, :last_name, :city, :state, :country, :email, :online \ No newline at end of file +attributes :id, :first_name, :last_name, :name, :city, :state, :country, :email, :online \ No newline at end of file diff --git a/app/views/api_users/index.rabl b/app/views/api_users/index.rabl index 3064a1366..8f9bbf9a7 100644 --- a/app/views/api_users/index.rabl +++ b/app/views/api_users/index.rabl @@ -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 \ No newline at end of file +attributes :id, :first_name, :last_name, :name, :city, :state, :country, :email, :online, :musician, :photo_url \ No newline at end of file diff --git a/app/views/api_users/show.rabl b/app/views/api_users/show.rabl index 809637732..c8f8ae3e5 100644 --- a/app/views/api_users/show.rabl +++ b/app/views/api_users/show.rabl @@ -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