Sha256: edcf91f07c3f05e97e88e7858bf3ebdd607cee7820c4db7ecf3b0caf0f09b119

Contents?: true

Size: 211 Bytes

Versions: 2

Compression:

Stored size: 211 Bytes

Contents

# http://stackoverflow.com/questions/5381738/rails-article-helper-a-or-an
def indefinite_articlerize(params_word)
  %w(a e i o u).include?(params_word[0].downcase) ? "an #{params_word}" : "a #{params_word}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_token_authentication-1.0.0.pre.5 test/dummy/config/initializers/indefinite_articlerize.rb
simple_token_authentication-1.0.0.beta.5 test/dummy/config/initializers/indefinite_articlerize.rb