Google Analytics
- We passed in the onclick trackers as options
- This the gem we used to install the UA code in the footer, also used this for reference.
Arel
- [Some cool arel queries](http://stackoverflow.com/questions/4402815/is-there-a-particularly-elegant-way-to-do-a-count-query-with-rails-3-arel.
- used a lamba as shown here, because otherwise the queries will be cached and we were running queries for a day to day basis.
- ARel has some good documentation.
Local Storage
- see the local storage article
- I think this was the first time I used the push method in coffeescript.
Z-index
- in order to use z-index you need to use the position absolute, relative, or fixed as mentioned here
SASS
>*
selects all the elements in the selector
PG backups
- Backing up a larger DB on heroku -> docs
update 11/7/13
- heroku pgbackups:capture
to capture the DB (make sure to specify app if you have multiple heroku apps)
- heroku pgbackups
will list the backups that have been made.
Anchor in a path helper
- pass it in as an option
redirect_to post_path(comment.post, :anchor => "comment-#{comment.id}")
-> from
Regex
- remember there is no whitespacing in regex
background_\w|clicked_space
notbackground_\w | clicked_space
Background images in mobile
- need to make sure to explicity define the background image and background size for mobile