When you use a belongs_to or has_many macro you might be surprised that the methods that it generates...

Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...

makandra dev

To print a colored full-width bar on the bash, use this bash script expression: echo -e '\033[37;44m...

makandra dev

rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...

makandra dev

Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...

Browsers usually cache favicons. If you update the favicon of your web site and want all visitors to see the...

faviconit.com

Eduardo Russo was tired of complex favicon creation and created his own favicon generator. It's really easy and allows...

String#indent is not a standard Ruby method. When you use it, be sure to know where this method comes...

You might have a table without a primary key set in MySQL. You can fix this by adding a primary...

Usually, Cucumber feature files live in features/. When you group them in sub directories, make sure to add -r features...

Tests are about 100% control over UI interaction and your test scenario. Randomness makes writing tests hard. You will also...

class Book::Page end class MyBook < Book def new_page Page.new # has to be `Book::Page` in development to...

Ask before leaving an unsaved CKEditor Vanilla JavaScript way, but removes any other onbeforeunload handlers: $(function(){ document.body.onbeforeunload = function() { for(editorName...

Make your custom web font available Add to ckeditor/config.js CKEDITOR.editorConfig = function(config) { config.contentsCss = [ '/assets/myCkeditorStyles.css', // any other file to encapsulate custom...

When you are working with Backbone models and inheritance, at some point you want to overwrite inherited methods but call...

relishapp.com

Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...

github.com

Put the attached file into features/support/. Example usage: When /^I open the task named "(.+?)"$/ do |task_name| task = page.all('.task...

kadin.sdf-us.org

This is just a quick note, mostly for my own reference, of a few ways to easily delete the dot...

If you have a text that is edited by WSYIWYG-Editor but want some length checking nevertheless, you need to...

Sometimes you want to strip a text of every special char. If you use \W, the result might not be...

After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...

makandra dev
justinjackson.ca

Nice thoughts about marketing and sales for developers.

Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...

jacklmoore.com

Non-static elements will not inherit their parent's opacity in IE for no good reason. This can lead to...