This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movie.rb: | |
# With help from | |
# http://almosteffortless.com/2008/12/11/easy-upload-via-url-with-paperclip/ | |
has_attached_file :poster, | |
:styles => { | |
:small => "150x150>" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder