Skip to content

Commit

Permalink
annotate models
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Dobzinski committed Jan 28, 2012
1 parent bcfe6b1 commit e254e78
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ group :test do
gem "guard-rspec"
end

group :development do
gem 'annotate', '~> 2.4.1.beta'
end

2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GEM
activesupport (3.2.1)
i18n (~> 0.6)
multi_json (~> 1.0)
annotate (2.4.1.beta1)
ansi (1.4.1)
arel (3.0.0)
bcrypt-ruby (3.0.1)
Expand Down Expand Up @@ -156,6 +157,7 @@ PLATFORMS
ruby

DEPENDENCIES
annotate (~> 2.4.1.beta)
bcrypt-ruby (~> 3.0.0)
capybara
coffee-rails (~> 3.2.1)
Expand Down
14 changes: 14 additions & 0 deletions app/models/position.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# == Schema Information
#
# Table name: positions
#
# id :integer not null, primary key
# user_id :integer not null
# lead_search_id :integer
# source :string(255)
# name :string(255)
# details :text
# created_at :datetime not null
# updated_at :datetime not null
#

class Position < ActiveRecord::Base
belongs_to :user
belongs_to :lead_search
Expand Down
13 changes: 13 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# email :string(255) not null
# password_digest :string(255)
# first_name :string(255)
# last_name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#

class User < ActiveRecord::Base
has_many :positions
has_secure_password
Expand Down
14 changes: 14 additions & 0 deletions spec/models/position_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# == Schema Information
#
# Table name: positions
#
# id :integer not null, primary key
# user_id :integer not null
# lead_search_id :integer
# source :string(255)
# name :string(255)
# details :text
# created_at :datetime not null
# updated_at :datetime not null
#

require 'spec_helper'

describe Position do
Expand Down
13 changes: 13 additions & 0 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# email :string(255) not null
# password_digest :string(255)
# first_name :string(255)
# last_name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#

require 'spec_helper'

describe User do
Expand Down
Empty file removed test/fixtures/.gitkeep
Empty file.
Empty file removed test/unit/.gitkeep
Empty file.
Binary file added vendor/cache/annotate-2.4.1.beta1.gem
Binary file not shown.

0 comments on commit e254e78

Please sign in to comment.