I hereby claim:
- I am jesseclay on github.
- I am jesseclay (https://keybase.io/jesseclay) on keybase.
- I have a public key ASDrwPuWEEhFsoNuZKLskD_H-F97dXbkUom86ctlVpRuIQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| This is a basic guide to utilizing Jquery and Ajax in Rails, written by Eric Chen, Christine Marquardt and Jesse Clayburgh. | |
| Ajax: using Javascript to make requests to the server, parse the response, and update information on the current web page. | |
| While Rails ships with CoffeeScript (a javascript compilier-- an more 'compact' way of writing Javascript), it's highly recommended to continue using Javascript like we've been using the past 3 weeks throughout phase II. | |
| Rails uses a technique called "Unobtrusive JavaScript" to handle attaching JavaScript to the DOM. | |
| Here's the simplest way to write JavaScript. You may see it referred to as 'inline JavaScript': |
| <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
| <link rel="stylesheet" href="main.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
| <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
| </head> |
| class Vehicle | |
| attr_reader :color, :status | |
| def initialize(args) | |
| @wheels = self.wheels | |
| @seats = self.seats | |
| @status = self.status | |
| @color = args.fetch(:color) {self.color} | |
| @speed = self.speed | |
| end |
| <html> | |
| <head> | |
| <title>Welcome to PassFly!</title> | |
| <link rel="stylesheet" type="text/css" href="css/main.css"> | |
| <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet"> | |
| <link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'> | |
| <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/redmond/jquery-ui.css"> | |
| <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> |