2024-09-26 18:20:05 -07:00
|
|
|
module PetStatesHelper
|
|
|
|
def pose_name(pose)
|
|
|
|
case pose
|
|
|
|
when "HAPPY_FEM"
|
|
|
|
"Happy (Feminine)"
|
|
|
|
when "HAPPY_MASC"
|
|
|
|
"Happy (Masculine)"
|
|
|
|
when "SAD_FEM"
|
|
|
|
"Sad (Feminine)"
|
|
|
|
when "SAD_MASC"
|
|
|
|
"Sad (Masculine)"
|
|
|
|
when "SICK_FEM"
|
|
|
|
"Sick (Feminine)"
|
|
|
|
when "SICK_MASC"
|
|
|
|
"Sick (Masculine)"
|
|
|
|
when "UNCONVERTED"
|
|
|
|
"Unconverted"
|
|
|
|
else
|
2024-09-27 22:14:00 -07:00
|
|
|
"Not labeled yet"
|
2024-09-26 18:20:05 -07:00
|
|
|
end
|
|
|
|
end
|
2024-09-27 22:14:00 -07:00
|
|
|
|
2024-09-27 22:34:52 -07:00
|
|
|
POSE_OPTIONS = %w(HAPPY_FEM SAD_FEM SICK_FEM HAPPY_MASC SAD_MASC SICK_MASC
|
|
|
|
UNCONVERTED UNKNOWN)
|
2024-09-27 22:14:00 -07:00
|
|
|
def pose_options
|
2024-09-27 22:34:52 -07:00
|
|
|
POSE_OPTIONS
|
|
|
|
end
|
|
|
|
|
2024-10-11 17:44:23 -07:00
|
|
|
def useful_pet_state_path(pet_type, pet_state)
|
2024-09-27 22:34:52 -07:00
|
|
|
if support_staff?
|
2024-10-11 17:44:23 -07:00
|
|
|
edit_pet_type_pet_state_path(pet_type, pet_state)
|
2024-09-27 22:34:52 -07:00
|
|
|
else
|
2024-10-11 17:44:23 -07:00
|
|
|
wardrobe_path(
|
|
|
|
color: pet_type.color_id,
|
|
|
|
species: pet_type.species_id,
|
|
|
|
pose: pet_state.pose,
|
|
|
|
state: pet_state.id,
|
|
|
|
)
|
2024-09-27 22:34:52 -07:00
|
|
|
end
|
2024-09-27 22:14:00 -07:00
|
|
|
end
|
2024-09-26 18:20:05 -07:00
|
|
|
end
|