diff --git a/app/assets/templates/profile-info.jst.hbs b/app/assets/templates/profile-info.jst.hbs index 3e6a3fae7..1b9049cfe 100644 --- a/app/assets/templates/profile-info.jst.hbs +++ b/app/assets/templates/profile-info.jst.hbs @@ -1,7 +1,7 @@
-
+

- {{full_name}} + {{name}}

diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index e9b8e303d..b515db975 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -8,11 +8,13 @@ class ProfilesController < ApplicationController respond_to :html, :except => [:show] respond_to :js, :only => :update + # this is terrible because we're actually serving up the associated person here; + # however, this is the effect that we want for now def show - @profile = Person.find_by_guid!(params[:id]).profile + @person = Person.find_by_guid!(params[:id]) respond_to do |format| - format.json { render :json => @profile } + format.json { render :json => @person.as_api_response(:backbone) } end end diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb index f53726267..10165d6fb 100644 --- a/spec/controllers/profiles_controller_spec.rb +++ b/spec/controllers/profiles_controller_spec.rb @@ -13,7 +13,7 @@ describe ProfilesController do describe '#show' do it "returns the user as json" do get :show, :id => @user.person.guid, :format => :json - response.body.should == @user.person.profile.to_json + JSON.parse(response.body).should == JSON.parse(@user.person.as_api_response(:backbone).to_json) end end diff --git a/spec/javascripts/app/views/small_frame_view_spec.js b/spec/javascripts/app/views/small_frame_view_spec.js index 8760bf8ab..167668be0 100644 --- a/spec/javascripts/app/views/small_frame_view_spec.js +++ b/spec/javascripts/app/views/small_frame_view_spec.js @@ -21,6 +21,7 @@ describe("app.views.SmallFrame", function(){ describe("redirecting to a post", function(){ beforeEach(function(){ + app.page = {editMode : false} app.router = new app.Router() spyOn(app.router, "navigate") })