makandra dev

This card shows you how to format a card's content using Markdown. We use the Commonmarker interpreter, so here...

Undeterministically I got a nil error on saving the object caused by the random order of hash elements of the...

Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the...

Don't you just hate to write Cucumber path helpers to be able to say this?

The attached patch lets you find a record by a string or number in any column: User.find_by_anything('carla...

makandra dev

Copy the attached file to config/initializers/indent_string.rb and you can say "foo".indent(4) # " foo" Note you will find many simpler...

Sometimes it might be helpful to have a version history for a gem, e.g. when you want to see if...

You can use text-overflow to truncate a text using CSS but it does not fit fancy requirements.

Possible Reason 1: parallel_tests - running more processes than features If you run old versions of parallel_tests with more...

If Sunspot does not work and fails with a backtrace similar to this: /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response' /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164...

The following snippet demonstrates how you could create excel files (with spreadsheet gem) and format columns so that they follow...

Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:

makandra dev
github.com

Gem to get Rails 3's new ActiveRecord query interface (where, order) and the new scope syntax (chaining scope definitions...

Removing features and merging those changes back can be painful. Here is how it worked for me.\

blog.bitcrowd.net

To make the RSpec matcher of the authorization solution Consul work with Rspec 2.x read the following blog post...

jQuery UI's date picker and date time picker doesn't work on touch interfaces. Solution 1: Use Mobiscroll

After my update from MacOS X 10.6 Snow Leopard to 10.7 Lion the search function in Apple Mail stopped working...

makandracards.com

Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...

Association named 'variations' was not found; perhaps you misspelled it? I just was hunting down a strange error with this...

apidock.com

[1,2,3,4].sample # => e.g. 4 If you'd like to cheat and give different weights to each element...

apidock.com

Using rename_column, remove_column, etc. more than once in a migration makes that migration run slower than it should...

makandra dev

You have to specify the environment with -e env_name or RAILS_ENV=env_name if you want to run...

Forms with many inputs (600+ in my case) become extremely unresponsive on an iPad, up to the point where it...

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...