def is_a_number?(s) s.to_s.match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil? false : true end Post navigation Rails Plugins with SVN Migration Generator Shortcuts