|
@ -1,16 +1,15 @@ |
|
|
class UserProfile < ActiveRecord::Base |
|
|
class UserProfile < ActiveRecord::Base |
|
|
# Setup accessible (or protected) attributes for your model |
|
|
|
|
|
attr_accessible :user_id, :addrStreet1, :addrStreet2, :addrCity, |
|
|
attr_accessible :user_id, :addrStreet1, :addrStreet2, :addrCity, |
|
|
:addrState, :addrZip, :phone |
|
|
:addrState, :addrZip, :phone |
|
|
|
|
|
|
|
|
belongs_to :user |
|
|
belongs_to :user |
|
|
belongs_to :bike |
|
|
belongs_to :bike |
|
|
|
|
|
|
|
|
#validates :addrStreet1 , :presence => true |
|
|
#validates :addrStreet1 , :presence => true |
|
|
#validates :addrCity , :presence => true |
|
|
#validates :addrCity , :presence => true |
|
|
#validates :addrState , :presence => true |
|
|
#validates :addrState , :presence => true |
|
|
#validates :addrZip , :presence => true |
|
|
#validates :addrZip , :presence => true |
|
|
validates :phone, :presence => true |
|
|
#validates :phone, :presence => true |
|
|
|
|
|
|
|
|
def to_s |
|
|
def to_s |
|
|
[addrStreet1, addrStreet2, addrCity, addrState, addrZip, phone].join(" - ") |
|
|
[addrStreet1, addrStreet2, addrCity, addrState, addrZip, phone].join(" - ") |
|
|