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
jquery.hover (arg) -> | |
... | |
, (arg) -> | |
... |
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 User < ActiveRecord::Base | |
end | |
class Post | |
include Mongoid::Document | |
references_many :comments | |
end | |
class Comment |
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
def new | |
client = Client.create!(:name => 'border', :description => 'lala') | |
content = Content.new(:key => 'help_about', :value => 'hello there') | |
content.client = client | |
end | |
class Client | |
include Mongoid::Document | |
field :name |
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 'rubygems' | |
require 'mongoid' | |
Mongoid.configure do |config| | |
config.master = Mongo::Connection.new.db("mongoid_key_test") | |
end | |
Mongoid.master.collection("users").drop | |
class User |
NewerOlder