Moves the humanize_document_type helper to a new helper file called user
This commit is contained in:
@@ -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
|
||||
|
||||
12
app/helpers/user_helper.rb
Normal file
12
app/helpers/user_helper.rb
Normal 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
|
||||
Reference in New Issue
Block a user