Skip to content

Instantly share code, notes, and snippets.

View pcg79's full-sized avatar

Pat George pcg79

  • FreeAgent
  • Edinburgh, Scotland
View GitHub Profile
@pcg79
pcg79 / set_cookie_domain.rb
Created November 10, 2010 22:29
Changes required by IE cookie bug
// An Unobtrusive Javascript (UJS) driver based on explicit behavior definitions. Just
// put a "data-behaviors" attribute on your view elements, and then assign callbacks
// for those named behaviors via Behaviors.add.
var Behaviors = {
observers: {},
observe: function(trigger) {
$(document.body).observe(trigger, this.onTrigger.bind(this));
},
movie.rb:
# With help from
# http://almosteffortless.com/2008/12/11/easy-upload-via-url-with-paperclip/
has_attached_file :poster,
:styles => {
:small => "150x150>"
}
# Rails Template: something_great.rb
# by Jim Garvin (coderifous)
#
# * shoulda/mocha/factory girl
# * pacecar for lots of automatic scopes
# * haml
# * sprockets for javascript management
# * will paginate
# * limerick_rake gives some nice utilities
# * asks for a hoptoad API key, and if given, will setup hoptoad initializer