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
# A monkey-patch that allows you to use comma as decimal separator in ActiveRecord | |
# Notice for rails 5.0: in Rails 5.0 module Type with all nested classes is moved into ActiveModel, | |
# so don't forget to substitute 'module ActiveRecord' with 'module ActiveModel' after update | |
module ActiveRecord | |
module Type | |
class Decimal | |
private | |
alias_method :cast_value_without_comma_separator, :cast_value |
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
#!/bin/sh | |
# thin This shell script takes care of starting and stopping | |
# thin daemon from rbenv shared install | |
# | |
# chkconfig: 2345 85 15 | |
# description: thin is an Ruby web server | |
# config: /etc/sysconfig/thin | |
### BEGIN INIT INFO |
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
#model (idea 100% stolen from ryanb) | |
def author_tokens=(ids) | |
ids.gsub!(/CREATE_(.+?)_END/) do | |
Author.create!(:name => $1).id | |
end | |
self.author_ids = ids.split(",") | |
end | |
# jquery.tokeninput.js |