Commit 8fb44a478abb5ccd345b8ffaf1f37817d273ad30
1 parent
395255b6
Exists in
master
adding aditional fields
Showing
4 changed files
with
20 additions
and
2 deletions
Show diff stats
lib/ext/article.rb
@@ -5,4 +5,8 @@ class Article | @@ -5,4 +5,8 @@ class Article | ||
5 | has_many :states, :through => :article_categorizations, :source => :category, :class_name => State | 5 | has_many :states, :through => :article_categorizations, :source => :category, :class_name => State |
6 | has_many :cities, :through => :article_categorizations, :source => :category, :class_name => City | 6 | has_many :cities, :through => :article_categorizations, :source => :category, :class_name => City |
7 | 7 | ||
8 | + settings_items :free_conference | ||
9 | + | ||
10 | + attr_accessible :free_conference | ||
11 | + | ||
8 | end | 12 | end |
lib/ext/environment.rb
@@ -8,6 +8,7 @@ class Environment | @@ -8,6 +8,7 @@ class Environment | ||
8 | orig_custom_person_fields.merge!({'orientacao_sexual' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) | 8 | orig_custom_person_fields.merge!({'orientacao_sexual' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) |
9 | orig_custom_person_fields.merge!({'identidade_genero' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) | 9 | orig_custom_person_fields.merge!({'identidade_genero' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) |
10 | orig_custom_person_fields.merge!({'transgenero' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) | 10 | orig_custom_person_fields.merge!({'transgenero' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) |
11 | + orig_custom_person_fields.merge!({'etnia' => {"active"=>"true", "required"=>"false", "signup"=>"true"}}) | ||
11 | end | 12 | end |
12 | 13 | ||
13 | end | 14 | end |
lib/ext/person.rb
@@ -2,8 +2,8 @@ require_dependency 'person' | @@ -2,8 +2,8 @@ require_dependency 'person' | ||
2 | 2 | ||
3 | class Person | 3 | class Person |
4 | 4 | ||
5 | - settings_items :orientacao_sexual, :identidade_genero, :transgenero, :tipo | 5 | + settings_items :orientacao_sexual, :identidade_genero, :transgenero, :tipo, :etnia |
6 | 6 | ||
7 | - attr_accessible :orientacao_sexual, :identidade_genero, :transgenero, :tipo | 7 | + attr_accessible :orientacao_sexual, :identidade_genero, :transgenero, :tipo, :etnia |
8 | 8 | ||
9 | end | 9 | end |
lib/ext/user.rb
@@ -34,6 +34,19 @@ class User | @@ -34,6 +34,19 @@ class User | ||
34 | self.person_data[:tipo] = value | 34 | self.person_data[:tipo] = value |
35 | end | 35 | end |
36 | 36 | ||
37 | + def etnia | ||
38 | + self.person.etnia unless self.person.nil? | ||
39 | + end | ||
40 | + | ||
41 | + def etnia= value | ||
42 | + self.person_data[:etnia] = value | ||
43 | + end | ||
44 | + | ||
45 | + def city= city | ||
46 | + city = City.find(city) unless city.kind_of?(City) | ||
47 | + self.person_data[:region] = city | ||
48 | + end | ||
49 | + | ||
37 | def category_ids= categories | 50 | def category_ids= categories |
38 | self.person_data[:category_ids] = categories | 51 | self.person_data[:category_ids] = categories |
39 | end | 52 | end |