...deeper than 1 level: options = params.merge(:include => { :user => :avatar }) Post.paginate options When inspecting the merged params you will get something like this: { :include=> { "user" => :avatar }, :page => 23 } Here the :user...
CONCAT('foo', 'bar', NULL) = NULL the NULL always wins in MySQL. If you would rather treat NULL as...
Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...
Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...
In Puppet, there are some differences between defined and function types when it comes to code encapsulation. In most cases...
First, decide if you want to pull with rebase. There are some implications of changing this, so think before you...
Master mode (Rails 2) Put the attached file into your spec directory, then merge these lines into your spec_helper.rb: require 'spec/constants_helper' Spec::Runner.configure do |config| # ... config.include ConstantsHelper config.after(:each...
Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']) or a hash (:conditions => { 'state' => 'draft...
If you plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you...
Siehe Advanced git [2d] aus dem Developer Curriculum.
When you need to use diff in either some Ruby code or your Rails app, use the differ gem.
There is a nasty bug in all version of Rails 2 and some versions of Rails 3.x where two...
A comprehensive introduction to sending HTML emails. Intro: HTML email: Two words that, when combined, brings tears to a developer...
...another Pull Request, you will still see them after the "child" PR has been merged. Unfortunately, GitHub won't automatically update the diff (or commit list). Here is what worked...
...you can do the above for your source branch (the one that's being merged into master). Obviously, only the PR of that branch will be updated, but may just...
Reformatted the checklist into separate “Human checks” and “Agent checks” sections. Modernized the checklist items.
...it: The pdf toolkit pdftk. pdftk can do almost any PDF-related task as merging, splitting, rotating, decrypting, encrypting, filling forms, applying watermarks, reporting metadata and bookmarks, attaching files and...
...COMMIT, but this is not the most recent. If you have neither pushed nor merged it, you can do this: Make a new commit now, with a message like "fix...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
If you added a file by mistake, you can unstage it (but keep local changes) by saying git reset HEAD...
When we started using git to manage our source code at work, we actually jumped in a little bit too...
git command line options for automating common rebasing tasks, like adding a fix to a commit that was already rebased...
All the hidden and not hidden features of Git and GitHub.
Introducing Trailer from HouseTrip, a simple menu bar app that helps you manage your GitHub pull requests. It’s one...
Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites. Note that rcov won't ever have support for Ruby 1.9, you...