diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index a1c7cf7b5..1c72fedbf 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -12,6 +12,17 @@ module AdminHelper options end + def humanize_document_type(document_type) + case document_type + when "1" + t "verification.residence.new.document_type.spanish_id" + when "2" + t "verification.residence.new.document_type.passport" + when "3" + t "verification.residence.new.document_type.residence_card" + end + end + private def namespace diff --git a/app/models/user.rb b/app/models/user.rb index 326b7a7b4..fa589b126 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -22,6 +22,7 @@ class User < ActiveRecord::Base has_many :debates, -> { with_hidden }, foreign_key: :author_id has_many :proposals, -> { with_hidden }, foreign_key: :author_id has_many :comments, -> { with_hidden } + has_many :failed_census_calls validates :username, presence: true, unless: :organization? validates :username, uniqueness: true, unless: :organization? diff --git a/app/views/admin/verifications/_failed_census_call.html.erb b/app/views/admin/verifications/_failed_census_call.html.erb new file mode 100644 index 000000000..793fdb2e4 --- /dev/null +++ b/app/views/admin/verifications/_failed_census_call.html.erb @@ -0,0 +1,6 @@ +