Moves the humanize_document_type helper to a new helper file called user

This commit is contained in:
kikito
2015-10-02 18:40:56 +02:00
parent 9e05a3283c
commit 967bfc5b31
2 changed files with 13 additions and 12 deletions

View File

@@ -12,21 +12,10 @@ 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
controller.class.parent.name.downcase
end
end
end

View File

@@ -0,0 +1,12 @@
module UserHelper
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
end