- Add image to User
- Add a link to the sidebar to "Favorite cats"
- Add like / unlike to cat's show page
- Show like counter for each cat
- Add 'mini-feed' to user's show page with first 3 cats and link to more
<ul class="media-grid"> | |
<% @cats.each do |cat| %> | |
<li class='thumbnail'> | |
<%= link_to cat_path(cat) do %> | |
<%= image_tag cat.image.url, alt: cat.name %> | |
<% end %> | |
<ul class="controls"> | |
<% if can_like?(cat) %><li><%= link_to 'Like', like_cat_path(cat), method: :post, :class => 'btn btn-mini' %></li><% end %> | |
<% if can_unlike?(cat) %><li><%= link_to 'UnLike', unlike_cat_path(cat), method: :post, :class => 'btn btn-mini' %></li><% end %> | |
<% if can_edit?(cat) %><li><%= link_to 'Edit', edit_cat_path(cat), :class => 'btn btn-mini' %></li><% end %> |
.media-grid { | |
width: 100%; | |
} | |
.media-grid > li { | |
float: left; | |
display: block; | |
margin-right: 20px; | |
margin-bottom: 20px; |
# The amazing coffee | |
foo = (a,b) -> | |
a * b |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
if [ $# -eq 0 ] ; then | |
echo "No args given" | |
echo "Missing Heroku app name" | |
exit 1 | |
fi | |
APP_NAME="--app ${1}" | |
echo "heroku addons:add heroku-postgresql:dev ${APP_NAME}" | |
heroku addons:add heroku-postgresql:dev ${APP_NAME} |
ZSH | |
=============== | |
- Typo correction: | |
crl google.com | |
- Really smart completion | |
kill [tab] | |
ls - [tab S] | |
- History accross sessions |