diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index ab2b6811f..57c18fa7b 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -6,8 +6,6 @@ class PeopleController < ApplicationController before_action :authenticate_user!, except: [:show, :stream] before_action :find_person, only: [:show, :stream, :hovercard] - layout proc { request.format == :mobile ? "application" : "with_header" }, only: %i( show contacts ) - respond_to :html, :except => [:tag_index] respond_to :json, :only => [:index, :show] respond_to :js, :only => [:tag_index] @@ -91,7 +89,7 @@ class PeopleController < ApplicationController gon.preloads[:contacts] = { count: Contact.contact_contacts_for(current_user, @person).count(:all), } - respond_with @person + respond_with @person, layout: "with_header" end format.mobile do @@ -151,7 +149,7 @@ class PeopleController < ApplicationController } @contacts_of_contact = @contacts_of_contact.paginate(:page => params[:page], :per_page => (params[:limit] || 15)) @hashes = hashes_for_people @contacts_of_contact, @aspects - respond_with @person + respond_with @person, layout: "with_header" else flash[:error] = I18n.t 'people.show.does_not_exist' redirect_to people_path diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index c86c26ea6..7c543c140 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -6,8 +6,6 @@ class PhotosController < ApplicationController before_action :authenticate_user!, :except => :show respond_to :html, :json - layout proc { request.format == :mobile ? "application" : "with_header" }, only: :index - def show @photo = if user_signed_in? current_user.photos_from(Person.find_by_guid(params[:person_id])).where(id: params[:id]).first @@ -34,7 +32,7 @@ class PhotosController < ApplicationController gon.preloads[:contacts] = { count: Contact.contact_contacts_for(current_user, @person).count(:all), } - render 'people/show' + render "people/show", layout: "with_header" end format.json{ render_for_api :backbone, :json => @posts, :root => :photos } end