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
#!/usr/bin/env ruby | |
# simple pre-commit hook to vendors gems using 'bundle package' if changes to | |
# Gemfile are detected. I use it to package private gems for use on Heroku | |
# using semi-colons to surpress console output from system calls | |
changes = `git status -s -uno`; | |
if changes =~ /M\s+Gemfile/ |
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
// based on http://css3-buttons.heroku.com/stylesheets/sass/_buttons.sass | |
// updated to use compass' own css3 mixins rather than custom ones | |
// | |
// usage: | |
// | |
// <a href="#" class="button">Foo</a> | |
// <input type="submit" class="button">Bar</a> | |
// | |
// .button | |
// +standard-button(red) |
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
# puts this file in config/initializers | |
# | |
# adds GET /resource/:id/delete to all singular and plural routes | |
# works with the :only and :except options for resources() and resource() | |
module ActionDispatch::Routing::Mapper::Resources | |
class Resource | |
# nodoc | |
def default_actions_with_delete_action(*args) | |
actions = default_actions_without_delete_action(*args) |