add everything to manage reputations
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module CharactersHelper
|
||||
end
|
||||
16
app/helpers/wow_characters_helper.rb
Normal file
16
app/helpers/wow_characters_helper.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module WowCharactersHelper
|
||||
def wow_character_title_name(wow_character)
|
||||
if wow_character.wow_character_title
|
||||
case wow_character.gender
|
||||
when 'FEMALE'
|
||||
wow_character.wow_character_title.female_name.gsub('{name}', wow_character.name)
|
||||
when 'MALE'
|
||||
wow_character.wow_character_title.male_name.gsub('{name}', wow_character.name)
|
||||
end
|
||||
else
|
||||
wow_character.name
|
||||
end
|
||||
end
|
||||
end
|
||||
12
app/helpers/wow_classes_helper.rb
Normal file
12
app/helpers/wow_classes_helper.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module WowClassesHelper
|
||||
def gender_class_name(gender, wow_class)
|
||||
case gender
|
||||
when 'FEMALE'
|
||||
wow_class.female_name
|
||||
when 'MALE'
|
||||
wow_class.male_name
|
||||
end
|
||||
end
|
||||
end
|
||||
12
app/helpers/wow_races_helper.rb
Normal file
12
app/helpers/wow_races_helper.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module WowRacesHelper
|
||||
def gender_race_name(gender, wow_race)
|
||||
case gender
|
||||
when 'FEMALE'
|
||||
wow_race.female_name
|
||||
when 'MALE'
|
||||
wow_race.male_name
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user