mirror of https://github.com/fspc/BikeShed-1.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
572 B
21 lines
572 B
12 years ago
|
class UserProfile < ActiveRecord::Base
|
||
|
# Setup accessible (or protected) attributes for your model
|
||
|
attr_accessible :bike_id, :addrStreet1, :addrStreet2, :addrCity,
|
||
|
:addrState, :addrZip, :phone
|
||
|
|
||
|
belongs_to :user
|
||
|
belongs_to :bike
|
||
|
|
||
|
validates :addrStreet1, :presence => true
|
||
|
validates :addrCity, :presence => true
|
||
|
validates :addrState, :presence => true
|
||
|
validates :addrZip, :presence => true
|
||
|
validates :phone, :presence => true
|
||
|
|
||
|
self.per_page = 15
|
||
|
|
||
|
def to_s
|
||
|
[addrStreet1, addrStreet2, addrCity, addrState, addrZip, phone].join(" - ")
|
||
|
end
|
||
|
end
|