1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
New WYSIWYG editor that claims to be lighter and prettier than TinyMCE and CKEditor. Has some Rails integration, too.
If you want a widget for awesome that runs a command regularly (every X seconds) and puts the output into...
You have multiple options: Just don't have a type column. All STI magic will be disabled automatically.
When you need to find out in which kind of spec you are during run-time, it's definitely possible...
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...
view_context.helper_method('args') Rails 2 ApplicationController.helpers.helper_method('args') Also see How to use helper methods inside a model...
The way Rational#to_s works on Ruby has changed from Ruby 1.9 on. Here is how to get the...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
Great look at the tradeoffs between progressive enhancement with jQuery or similiar, vs. client-side views.
This error can happen in Ruby 1.9. To fix it, add the following line to the top of your .js.erb...
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
In our continued quest to extract proven code snippets from makandropedia into tested and upgradable gems, we have released Edge...
TLDR: Ruby class variables (@@foo) are dangerous in many ways. You should avoid them at all cost. See bottom of...
There is a bug in ActiveRecord 2.3.x that leads to changes in nested forms getting lost. class Project < ActiveRecord...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
Consul 0.6.1+ gives you a way to dynamically access and query powers for a given name, model class or record...