- pick template
- or bootswatch
- create a local template blog.html in codeup.dev
- get creative with look
- load moment.js file
- use moment.js to alter the date
- load your own javascript file for your js code
- post json should follow format:
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title></title> | |
<style></style> | |
</head> | |
<body style="background: #6e6e6e;"> |
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
// List all elements from routes promise | |
listIt: function () { | |
users = this.get('controllers.application.users'); | |
return users | |
}.property('users'), | |
deleteUser: function (key) { | |
messageMethod.build('User', 'DELETE', '', key, function (data) { | |
console.log('deleted'); | |
}); |
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
// News click switcher | |
$('li[id*="newsSwitch-"').click(function (evt) { | |
var speed = 100; | |
var clickedClass = evt.currentTarget.id; | |
var clickedNumber = clickedClass.match(/\d/); | |
var title = document.getElementById('newsSwitch-title-' + clickedNumber).innerHTML; |
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
formError: function(errors) | |
{ | |
var message = errorMessages(errors.exType); | |
return message; | |
}, | |
<div class="message"> | |
{{formError}} | |
</div> |
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
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl | |
export PATH="/usr/local/bin:/usr/local/bin/subl:~/bin:$PATH" |
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
<?php | |
return array( | |
'debug' => true, | |
); |
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
// Create an action for the route | |
public function postToJson() | |
{ | |
// Query here for json you want to return | |
$post = Post::all(); | |
// Send to json response | |
return Response::json($post->toArray(), 200); | |
} |
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
<%= link_to 'Deposit', new_transaction_path(type: 'deposit') %> | |
# routes | |
get 'transactions/new/:type' => 'transactions#new' | |
resources :transactions | |
transactions GET /transactions(.:format) transactions#index | |
POST /transactions(.:format) transactions#create | |
new_transaction GET /transactions/new(.:format) transactions#new | |
edit_transaction GET /transactions/:id/edit(.:format) transactions#edit |
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
<?php | |
// Remember the class is aware. | |
// ========================== | |
function askElaine() { | |
echo 'Do you like me yes || no!' . PHP_EOL; | |
} | |
function doesLikeMe() { | |
echo 'I just want to be friends!' . PHP_EOL; |