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
class String | |
def to_bool | |
return true if self == true || self =~ (/(true|t|yes|y|1)$/i) | |
return false if self == false || self.blank? || self =~ (/(false|f|no|n|0)$/i) | |
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"") | |
end | |
end |
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
# MYSQL | |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: DBNAME_dev | |
pool: 5 | |
username: root | |
password: | |
socket: /tmp/mysql.sock |
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
$(function() { | |
// Handler for .ready() called. | |
}) | |
$(document).ready(function() { | |
// Handler for .ready() called. | |
}); |
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
$(document).ready(function() { | |
Review.init(); | |
}); | |
var Review = (function() { | |
return { | |
init: function() { | |
this.preset(); | |
}, | |
preset: function() { |