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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
group :development do | |
if RUBY_VERSION =~ /1.9/ | |
gem "ruby-debug19" | |
else | |
gem "ruby-debug" | |
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
require 'mongo_mapper' | |
module CarrierWave | |
module MongoMapper | |
include CarrierWave::Mount | |
## | |
# See +CarrierWave::Mount#mount_uploader+ for documentation | |
# | |
def mount_uploader(column, uploader, options={}, &block) | |
# We need to set the mount_on column (or key in MongoMapper's case) |
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 Event | |
include MongoMapper::Document | |
include MultiParameterAttributes | |
key :name, String, :required => true | |
key :start_date, Date, :required => true | |
key :start_time, Time, :required => true | |
end |