makandracards.com

Writing ruby methods that accept both optional and keyword arguments is dangerous and should be avoided. This confusing behavior will...

Starting with Rails 4.0, when you get an exception reported via the ExceptionNotification gem, you will only see a very...

makandra dev

Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...

github.com

Rails 5 will introduce ActiveRecord::Relation#or. On Rails 4 and 3.2 you can use the activerecord_any_of gem...

To safely transport an arbitrary string within a URL, you need to percent-encode characters that have a particular meaning...

As the web is being used for more and more tasks, expectations rise. Not only should web pages offer rich...

bibwild.wordpress.com

While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...

stackoverflow.com

With ngAnimate, you can easily animate certain events (see directive support). We'll make use of ngClass animations to style...

If you have problems installing a gem and get a error collect2: error: ld returned 1 exit status it's...

makandra dev
github.com

SitePrism gives you a simple, clean and semantic DSL for describing your site using the Page Object Model pattern, for...

makandra dev
blog.getbootstrap.com

Moved from Less to Sass. Bootstrap now compiles faster than ever thanks to Libsass, and we join...

It smells. Rethink your code design. Code example with makandra/has_defaults: class Post < ActiveRecord::Base has_defaults tags: [] # field in db...

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...

Spreewald comes with a selector_for helper that matches an English term like the user's profile into a CSS...

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...

To check which rubygems versions your different rbenv rubys are using, you can use this small bash script:

Use form models to handle this problem Or soften the validation to validates_presence_of :parent

Use base_class. This traverses up the hierarchy until it encounters either a class inheriting from ActiveRecord::Base or

CTRL + SHIFT + ALT + N Search for any symbol in your application, like CSS classes, Ruby classes, methods, helpers etc...

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...

marcparadise.com

When you the following error: zsh: corrupt history file /home/marc/.zsh_history You can try and fix your history file by extracting...