From 6abe718227bcc858bcb88c0f997c523908b1d256 Mon Sep 17 00:00:00 2001 From: Steven Hancock Date: Thu, 29 Mar 2012 04:51:00 -0700 Subject: [PATCH] Mobile UI fixes This fixes issues with mobile UI rendering Issues fixed: * vendor/bootstrap.css and vendor/bootstrap-responsive.css need to be precompiled for the mobile UI to render properly * Rails 3.1 is more strict about layout fallbacks, the single-post view in the mobile UI needs to have the "application" layout specified to render properly --- app/controllers/posts_controller.rb | 2 +- config/application.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 128c7cc4f..e5aa27773 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -39,7 +39,7 @@ class PostsController < ApplicationController respond_to do |format| format.xml{ render :xml => @post.to_diaspora_xml } - format.mobile{render 'posts/show.mobile.haml'} + format.mobile{render 'posts/show.mobile.haml', :layout => "application"} format.json{ render :json => PostPresenter.new(@post, current_user).to_json } format.any{render 'posts/show.html.haml'} end diff --git a/config/application.rb b/config/application.rb index 470869287..117e03c98 100644 --- a/config/application.rb +++ b/config/application.rb @@ -82,7 +82,8 @@ module Diaspora # Stylesheets config.assets.precompile += [ "blueprint.css", "bootstrap.css", "default.css", - "login.css", "mobile.css", "new-templates.css", "rtl.css" ] + "login.css", "mobile.css", "new-templates.css", "rtl.css", "vendor/bootstrap.css", + "vendor/bootstrap-responsive.css" ] # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0'