app/models/users/unit.rb
# Overrides #method_missing so that you can quickly check the abbreviation of the unit, like "unit.carlson?"
Overrides #method_missing so that you can quickly check the abbreviation of the unit, like "unit.carlson?"
Overrides #method_missing so that you can quickly check the abbreviation of the unit like " unit . carlson? "
def method_missing(method, *args)
    if m = method.to_s.match(/(\w+)\?/)
      return abbreviation == m[1] ? true : false
    else
      super
    end
  end
def method_missing ( method , * args ) if m = method . to_s . match ( / ( \w +) \? / ) return abbreviation == m [ 1 ] ? true : false else super end end
Overrides #method_missing so that you can quickly check the abbreviation of the unit, like "unit.carlson?"
Overrides #method_missing so that you can quickly check the abbreviation of the unit like " unit . carlson? "
method
args