Skip to content

Instantly share code, notes, and snippets.

@yiquncode
Created December 5, 2010 08:33
Show Gist options
  • Save yiquncode/728942 to your computer and use it in GitHub Desktop.
Save yiquncode/728942 to your computer and use it in GitHub Desktop.
<head>
<title><%= h(yield(:title) || "Untitled") %></title>
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag 'jquery.1.3.2.min' %>
<%= yield(:head) %>
</head>
<% title "Crop Avatar" %>
<% content_for (:head) do %>
<%= stylesheet_link_tag "jquery.Jcrop" %>
<%= javascript_include_tag "jquery.Jcrop.min" %>
<script type="text/javascript">
$(function() {
$('#cropbox').Jcrop();
});
</script>
<% end %>
<%= image_tag @user.avatar.url(:large), :id => "cropbox" %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment