Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.
To update your Rubygems to the latest available version, type the following: gem update --system Note that you have a...
Interesting talk about a team that integrated automated security testing into their BDD workflow. There is also a video of...
On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...
You may encounter problems with passenger starting an application with an updated rails. If you find an error like this...
You can include files from app/assets or from the public folder with javascript_include_tag. The subtle difference that tells...
As you most likely know validates_uniqness_of :foreign_id does not allow nil values by default.
Each time thin boots, it prints a boot message : Thin web server (v1.6.3 codename Protein Powder) Maximum connections set to...
A word of caution There should rarely be a reason for you to split up config/routes.rb. If you need to...
Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger
Free Bootstrap theme resembling Material Design. Bootswatch offers Sass and Less files, so the theme can easily be integrated into...
CTRL + SHIFT + ALT + N Search for any symbol in your application, like CSS classes, Ruby classes, methods, helpers etc...
In tests, it is sometimes useful to create records with specific ids. On PostgreSQL this can cause problems: Usually, PostgreSQL...
Jasmine comes with two matchers that test for equality. The first is toBe: expect(first).toBe(second) toBe passes when...
The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...
tl;dr: Use event.currentTarget unless you are absolutely certain that you need event.target. Since it hasn't been written down...
The team is responsible for building great software—that’s it. It’s the only thing the team is responsible...
Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...
iPads will not trigger click events for all elements. You can fix that, but you don't want to know...
Running projects parallel makes some trouble with PDF generation. Use geordi rspec spec to force sequential tests for the whole...
If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app...
Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...
CSS (+ some Javascript) framework, implementing Google's material design for static web pages. Can be used for plain websites without...
When using ORDER BY "column" in PostgreSQL, NULL values will come last. When using ORDER BY "column" DESC, NULLs will...