Volunteers, positions and days and volunteers list for admin, volunteering option for attendees
This commit is contained in:
parent
125d5fe3ff
commit
64b2b8b3f8
31 changed files with 335 additions and 79 deletions
|
|
@ -2,7 +2,7 @@ class Person < ActiveRecord::Base
|
|||
include Gravtastic
|
||||
gravtastic :size => 32
|
||||
|
||||
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname
|
||||
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname, :mobile, :tshirt, :languages, :volunteer_experience
|
||||
|
||||
belongs_to :user, :inverse_of => :person
|
||||
has_many :event_people, :dependent => :destroy
|
||||
|
|
@ -18,6 +18,7 @@ class Person < ActiveRecord::Base
|
|||
|
||||
before_create :generate_guid
|
||||
before_save :set_public_name
|
||||
before_save :languages_upcase
|
||||
|
||||
has_attached_file :avatar,
|
||||
:styles => {:tiny => "16x16>", :small => "32x32>", :large => "128x128>"},
|
||||
|
|
@ -26,6 +27,10 @@ class Person < ActiveRecord::Base
|
|||
|
||||
alias_attribute :affiliation, :company
|
||||
|
||||
def languages_upcase
|
||||
self.languages = self.languages.upcase
|
||||
end
|
||||
|
||||
def to_s
|
||||
if self.public_name.empty?
|
||||
self.first_name + " " + self.last_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue