Here is a way to create a duplicate of one database, with all its tables and their data, under a...
You can use fold: fold -sw 60 You can now paste your texts. fold will echo them back, word-wrapped...
Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...
There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...
Remember how Rails 2 came with an awesome feature that broke all code using Time.now or Time.parse? This behavior is...
Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...
jQuery as new default Javascript library, streaming response support, attr_accessible with roles, prepared statements, easier migrations.
I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print...
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...
Did you return false in a before_validation callback?
I recently browsed through the ActiveSupport code and found some nice stuff I did not know about: ActiveSupport::Callbacks
When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...
Do you wonder which databases are actually taking up how much space but only have one huge ibdata1 in your...
If you use Amazon AWS cloud services you definitively want to utilize software raid for IO intensive stuff such as...
Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in...
The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...
tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...
When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...
Note: If you are currently working with Ruby 1.8.7 or 1.9.3, we recommend to upgrade to Ruby 2.1 first. From...
In Rails 2, you could use link_to_remote...
...:update => 'id' to automatically replace the content of $('#id').
Note that this card is very old. You might want to use ActiveType for your auto-coerced virtual attributes instead...
Note: Consider using MATE instead of Gnome 3 on newer system Awesome is a very good tiling window manager that...
Install Ruby from the Ubuntu repository: sudo apt-get install ruby ruby-dev \ ruby is the meta package. If you...