##Refs
# Call scopes directly from your URL params: | |
# | |
# @products = Product.filter(params.slice(:status, :location, :starts_with)) | |
module Filterable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Call the class methods with the same name as the keys in <tt>filtering_params</tt> | |
# with their associated values. Most useful for calling named scopes from |
[ | |
// inserts / toggles erb tags <%= %> | <% %> | <%- -%> | <%= -%> | <%# %> | <% -%> | |
{ "keys": ["ctrl+shift+."], "command": "erb" }, | |
// Fold / Unfold Comments | |
{ "keys": ["ctrl+shift+c"], "command": "toggle_fold_comments" }, | |
// Reindent all Lines | |
{ "keys": ["ctrl+shift+r"], "command": "reindent" , "args": { "single_line": false } }, | |
// layout: show right column full / switch to single column layout | |
{ | |
"keys": ["alt+right"], |
{ | |
// use customized monokai color scheme (created with the awesome | |
// tmtheme-editor - see http://tmtheme-editor.herokuapp.com) | |
"color_scheme": "Packages/User/MonokaiCustomized2.tmTheme", | |
"ensure_newline_at_eof_on_save": false, | |
"use_simple_full_screen": false, | |
// glasses are expensive, protect your eyesight |
I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.
As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.
sudo apt-get update && sudo apt-get upgrade
In celebration of Whyday: Rubyists always want to show others the beautiful code | |
they have created, hence the question: Has Anybody Seen My Code? | |
Has Anybody Seen My Code | |
(sung to the tune of Has Anybody Seen My Gal) | |
Clean and small, works for all, | |
Ruby is my all in all. | |
Has anybody seen my code? |
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |