Skip to content

Instantly share code, notes, and snippets.

@ArunGupta25
Created June 4, 2012 17:07
Show Gist options
  • Save ArunGupta25/2869567 to your computer and use it in GitHub Desktop.
Save ArunGupta25/2869567 to your computer and use it in GitHub Desktop.
<% if current_user %>
<h1><%= @count %> Albums</h1>
</br>
<% @album_ids.each do |id| %>
<% album = FbGraph::Album.new(id, :access_token => current_user.fb_token) %>
<h3 id="album"> <%= link_to "Album #{id}", "/albums/#{id}" %> </h3>
<% end %>
<% else %>
<h1>You are not logged in!</h1>
<% end %>
<script>
$(document).ready(function() {
$('#album').click(function() {
var url=$(this).attr('href');
$('#album').load('/album');
return false;
}); //end click
}); // end ready
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment