Skip to content

Commit

Permalink
fixed facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Jun 30, 2012
1 parent 789d7e6 commit 0e3cde3
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
9 changes: 9 additions & 0 deletions app/views/layouts/application.html.erb
Expand Up @@ -35,6 +35,15 @@
</head>
<body lang="en">

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=151901608223813";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
Expand Down
4 changes: 3 additions & 1 deletion app/views/pages/index.html.erb
Expand Up @@ -42,7 +42,9 @@
})();
</script>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=151901608223813&amp;xfbml=1"></script><fb:like href="http://vivatjes.us/posts/<%=@post.id%>" send="true" width="450" show_faces="true" font=""></fb:like>
<br />
<div class="fb-like" data-href="http://vivatjes.us/posts/<%=@post.id%>" data-send="false" data-width="450" data-show-faces="true"></div>

<% end %>
<br class="clear" />

Expand Down
5 changes: 3 additions & 2 deletions app/views/posts/index.html.erb
Expand Up @@ -22,9 +22,10 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<br />
<div class="fb-like" data-href="http://vivatjes.us/posts/<%=post.id%>" data-send="false" data-width="450" data-show-faces="true"></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=151901608223813&amp;xfbml=1"></script><fb:like href="http://vivatjes.us/posts/<%=post.id%>" send="true" width="450" show_faces="true" font=""></fb:like>

<% if @current_user && @current_user.publisher %>
<p><%= link_to 'Edit*', :action => 'edit', :id => post %> | <%= link_to 'Destroy*', { :action => 'destroy', :id => post }, :confirm => 'Are you sure?', :method => :post %></p>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/posts/show.html.erb
Expand Up @@ -22,9 +22,9 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<br />
<div class="fb-like" data-href="http://vivatjes.us/posts/<%=@post.id%>" data-send="false" data-width="450" data-show-faces="true"></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=151901608223813&amp;xfbml=1"></script><fb:like href="http://vivatjes.us/posts/<%=@post.id%>" send="true" width="450" show_faces="true" font=""></fb:like>

<% end %>
<% if @current_user && @current_user.publisher %>
Expand Down
23 changes: 23 additions & 0 deletions log/development.log
Expand Up @@ -49708,3 +49708,26 @@ Compiled application.css (257ms) (pid 5826)
Compiled tinymce/preinit.js (1ms) (pid 5826)
Compiled tinymce/tiny_mce_src.js (6ms) (pid 5826)
Compiled tinymce.js (74ms) (pid 5826)
Connecting to database specified by database.yml


Started GET "/" for 127.0.0.1 at 2012-06-30 14:41:10 -0700
Processing by PagesController#index as HTML
User Load (6.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
Council Load (0.7ms) SELECT `councils`.* FROM `councils` WHERE `councils`.`councilnumber` = 'localhost:3000' LIMIT 1
Council Load (0.4ms) SELECT `councils`.* FROM `councils` WHERE `councils`.`id` = 1 LIMIT 1
Post Load (0.7ms) SELECT `posts`.* FROM `posts` WHERE (privateflag = 0) ORDER BY created_at DESC LIMIT 1
User Load (9.6ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1
Rendered pages/index.html.erb within layouts/application (192.1ms)
Completed 200 OK in 1042ms (Views: 586.8ms | ActiveRecord: 35.1ms)


Started GET "/posts/10" for 127.0.0.1 at 2012-06-30 14:41:41 -0700
Processing by PostsController#show as HTML
Parameters: {"id"=>"10"}
User Load (3.6ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
Post Load (6.2ms) SELECT `posts`.* FROM `posts` WHERE `posts`.`id` = 10 LIMIT 1
User Load (1.4ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1
DEPRECATION WARNING: :confirm option is deprecated and will be removed from Rails 4.0. Use ':data => { :confirm => 'Text' }' instead. (called from _app_views_posts_show_html_erb__1037123406117805945_70273955461140 at /usr/local/src/vivatjesus/app/views/posts/show.html.erb:31)
Rendered posts/show.html.erb within layouts/application (28.2ms)
Completed 200 OK in 100ms (Views: 44.4ms | ActiveRecord: 11.1ms)

0 comments on commit 0e3cde3

Please sign in to comment.