1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
BikeShed-1/app/models/user_profile.rb
2012-12-23 09:02:07 -05:00

21 lines
572 B
Ruby

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