Skip to content

Commit

Permalink
changed around locations of files that inherit from base models
Browse files Browse the repository at this point in the history
  • Loading branch information
dcunited001 committed Aug 14, 2011
1 parent da888a2 commit f6d58e9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions app/models/member.rb
Expand Up @@ -10,14 +10,14 @@ class Member < ActiveRecord::Base
has_one :address, :as => :addressable, :dependent => :destroy
belongs_to :rink

has_many :friends
has_many :friend_requests_recd, :class_name => 'Friendship', :foreign_key => 'member_requested_id'
has_many :friend_requests_sent, :class_name => 'Friendship', :foreign_key => 'member_requesting_id'
has_many :friends #view_friends
has_many :friend_requests_recd, :class_name => Friendship, :foreign_key => 'member_requested_id'
has_many :friend_requests_sent, :class_name => Friendship, :foreign_key => 'member_requesting_id'

#has_one :team #or has_many :teams with current_team method?
has_many :team_mates
has_many :team_requests_recd, :class_name => 'TeamRequest', :foreign_key => 'member_requested_id'
has_many :team_requests_sent, :class_name => 'TeamRequest', :foreign_key => 'member_requesting_id'
has_many :team_mates #view_team_mates
has_many :team_requests_recd, :class_name => TeamRequest, :foreign_key => 'member_requested_id'
has_many :team_requests_sent, :class_name => TeamRequest, :foreign_key => 'member_requesting_id'

validates_presence_of :first_name, :last_name, :birthday, :alias
validates_uniqueness_of :alias
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion config/application.rb
Expand Up @@ -15,7 +15,9 @@ class Application < Rails::Application
# Custom directories with classes and modules you want to be autoloadable.
puts config.root

config.autoload_paths += %W(#{config.root}/app/models/roles)
config.autoload_paths += %W(#{config.root}/app/models/friend)
config.autoload_paths += %W(#{config.root}/app/models/member)
config.autoload_paths += %W(#{config.root}/app/models/team)

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
Expand Down
6 changes: 1 addition & 5 deletions db/seeds.rb
Expand Up @@ -141,7 +141,7 @@
james = Factory(:member, :alias => 'anaconda')
brandon = Factory(:member, :alias => 'bb_sk8r')

puts 'Creating Some Teams'
puts 'Creating Some Teams and Team Members'
jammers_va = Factory(:team, :name => 'Jammers VA', :creator => dcunited)
Factory(:team_member, :team => jammers_va, :member_requesting => dcunited, :member_requested => xm_jester_mx)
Factory(:team_member_from, :team => jammers_va, :member_requesting => cooper, :member_requested => dcunited)
Expand All @@ -163,7 +163,3 @@







0 comments on commit f6d58e9

Please sign in to comment.