app/models/anime.rb
# Use this function to get the alt title instead of directly accessing the
# alt_title.
Use this function to get the alt title instead of directly accessing the
alt_title.
Use this function to get the alt title instead of directly accessing the alt_title .
def alternate_title(preference = '')
    if preference.class == User
      preference = preference.title_language_preference
    end
    case preference
    when 'canonical'
      english_canonical && alt_title.present? ? title : alt_title
    when 'english'
      alt_title.present? ? title : alt_title
    else
      alt_title
    end
  end
def alternate_title ( preference = '' ) if preference . class == User preference = preference . title_language_preference end case preference when 'canonical' english_canonical && alt_title . present? ? title : alt_title when 'english' alt_title . present? ? title : alt_title else alt_title end end
Use this function to get the alt title instead of directly accessing the
alt_title.
Use this function to get the alt title instead of directly accessing the alt_title .
preference
<not_specific>