This file contains hidden or 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
#!/bin/sh | |
label() { | |
printf '\033[1;30;43m %s \033[0m\n' $1 | |
} | |
# jQuery | |
label jquery-1.6.4.min.js | |
curl http://code.jquery.com/jquery-1.6.4.min.js > jquery-1.6.4.min.js | |
# Backbone.js |
This file contains hidden or 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
class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
['text_field', 'text_area'].each do |helper| | |
define_method helper do |field, *args| | |
options = args.detect{ |a| a.is_a?(Hash) } || {} | |
if @object.errors[field].any? | |
'<div class="clearfix error">'.html_safe + | |
(self.label field) + | |
'<div class="input">'.html_safe + | |
(super field, *args) + |
NewerOlder