This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| first your route | |
| ROUTES.RB | |
| get 'student' => 'students#search', defaults: { format: 'json' } | |
| SEARCH METHOD IN CONTROLLER | |
| def search | |
| @student = Student.search_student params (this customized method in Student model returns a relation) | |
| #byebug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> | |
| <link href="runnable.css" rel="stylesheet" /> | |
| <!-- Load jQuery and the validate plugin --> | |
| <script src="https://code.jquery.com/jquery-1.9.1.js"></script> | |
| <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> | |
| <link href="runnable.css" rel="stylesheet" /> | |
| <!-- Load jQuery and the validate plugin --> | |
| <script src="https://code.jquery.com/jquery-1.9.1.js"></script> | |
| <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script> |