1
0
Fork 0
This commit is contained in:
magnolia-fan 2011-11-29 03:56:02 +04:00
parent 94ae2ff3b0
commit aeea80997e
3 changed files with 31 additions and 9 deletions

View File

@ -1,7 +1,19 @@
(function(d, s, id) { $(function(){
// window.fbAsyncInit = function() {
// FB.init({
// appId : 'YOUR_APP_ID', // App ID
// channelURL : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
// status : true, // check login status
// cookie : true, // enable cookies to allow the server to access the session
// oauth : true, // enable OAuth 2.0
// xfbml : true // parse XFBML
// });
// };
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0]; var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;} if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk')); }(document, 'script', 'facebook-jssdk'));
});

View File

@ -11,7 +11,17 @@ class ApplicationController < ActionController::Base
def compile_page params def compile_page params
compiler = lambda do |params| compiler = lambda do |params|
@data = params[:data].is_a?(Proc) ? params[:data].call : params[:data].serialize unless params[:data].nil? @data = {}
unless params[:data].nil?
if params[:data].is_a?(Proc)
@data = params[:data].call
elsif params[:data].is_a?(Hash)
@data = params[:data]
else
@data = params[:data].serialize
end
end
@status = params[:status] @status = params[:status]
{ {
renderer: "unified", renderer: "unified",

View File

@ -1,6 +1,6 @@
namespace :deploy do namespace :deploy do
desc "Deploys our application on heroku" desc "Deploys our application on heroku"
task :run => [:off, :push, :migrate, :restart, :on, :tag] task :run => [:off, :push, :migrate, :restart, :on]
desc "Rolls previous deploy revision back" desc "Rolls previous deploy revision back"
task :rollback => [:off, :push_previous, :restart, :on] task :rollback => [:off, :push_previous, :restart, :on]