tenderlovemaking.com

You can define methods using def or define_method. In the real world, there is no performance difference.

This is quite an edge case, and appears like a bug in Rails (4.2.6) to me. Update: This is now...

makandra dev
gist.github.com

When ActiveRecord child objects are autosaved in Rails.

Note: This applies to plain Ruby scripts, Rails does not have this issue. When you work with Ruby strings, those...

makandra dev
dev.mensfeld.pl

Ruby 2.3.0 has been around since end of 2015. It brings some pretty nice new features! Make sure to read...

mitrev.net

As announced before, Ruby has introduced a safe navigation operator with version 2.3.0. receiver&.method prevents NoMethodErrors by intercepting method...

github.com

Ever needed to use a global variable in Rails? Ugh, that's the worst. If you need global state, you...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again...

As your Rails project grows, you will accumulate a number of small patches. These will usually fix a bug in...

to create a Gallery that has a name and has_many :images, which in turn have a...

jqueryui.com

UI sortable helps reordering items with drag 'n drop. It works quite fine. Proven configuration for sorting table rows

jquery.com

Since jQuery 3 saw it's first release candidate today, the links has a list of (breaking) changes.

When you have a localized website, you may want to redirect users to their preferred language when they visit the...

When you run rake db:rollback and nothing happens, you are probably missing the latest migration file (or have not...

github.com

Adds missing native PostgreSQL data types to ActiveRecord and convenient querying extensions for ActiveRecord and Arel for Rails 4.x...

makandra dev

If you're trying to searching or installing packages via pkg the your repository data might be broken. If pkg...

When dealing with time zones in Rails, there is one key fact to keep in mind: Rails has configurable time...

developer.mozilla.org

When building a form with a file select field, you may want to offer your users a live preview before...

Cucumber's docstrings let you add long strings to a step like this: # foo.feature Given this text: """ First line

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

ombulabs.com

Tool to show you which gems are slow to load: ➜ git:(master) ✗ bundle exec bumbler [################################################# ] (49/65) travis-lint...

Awesome is a very good tiling window manager that provides neat features like automatic layouting of windows, good multi-display...

You can use JavaScript to get or set cookie values on the client. Using the vanilla JavaScript API

To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.