Rails a/an inflector

225 Views Asked by At

Is there a built-in Rails inflector for determining if a word starts with a vowel? I have this (HAML):

  -if @user.aquire_deploy_text.match /^[aeiou]/i
    an
  -else
    a
  #{@user.aquire_deploy_text}.

Docs: http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html

0

There are 0 best solutions below