Class: DirectoryController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DirectoryController
- Defined in:
- app/controllers/directory_controller.rb
Instance Method Summary collapse
Instance Method Details
#search ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/directory_controller.rb', line 2 def search if searching_by_zip? search_by_zip else search_by_string end end |
#searching_by_zip? ⇒ Boolean
16 17 18 |
# File 'app/controllers/directory_controller.rb', line 16 def searching_by_zip? params[:criteria] =~ /[0-9]{5}/ end |