You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...

github.com

You can use the whatlanguage gem to detect the language of a Ruby string. Note that it also has not...

When you load a record with find options that have SQL fragments in :select or :joins, ActiveRecord will make that...

makandra dev

Update RubyGems and Passenger Bundler requires Rubygems >= 1.3.6. Run gem update --system if you have an older version.

When you create e.g. a sidebar box that contains headlines and paragraphs, the final paragraph's margin in that box...

When working with times and dates in Rails applications, you need to deal with the following problem: In Rails, Time...

makandra dev
ruportbook.com

Ruport’s acts_as_reportable module provides support for using ActiveRecord for data collection. You can use it to get...

In a nutshell: to avoid your shell character set from messing with imports, use -r to export and SOURCE when...

ALTER DATABASE database_name CHARACTER SET "utf8"; ALTER DATABASE database_name COLLATE "utf8_unicode_ci"; After that, for...

github.com

Ancestry is a gem/plugin that allows the records of a Ruby on Rails ActiveRecord model to be organised as a...

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

Unless all MySQL server defaults are set to UTF-8, mysqldump encodes UTF-8 characters incorrectly and only outputs correct...

Most of these will not work in newer projects because these use the Capybara/Rack::Test combo in lieu of Webrat...

makandra dev

To test concurrent code, you will need to run multiple threads. Unfortunately, when you use blocking system calls (e.g. locks...

makandra dev

Install gem and plugin sudo gem install parallel script/plugin install git://github.com/grosser/parallel_tests.git Adapt config/database.yml test: database: xxx_test<%= ENV...

makandra dev

tmp/* storage/* db/*.sqlite3 db/schema.rb db/structure.sql public/system .project .idea/ public/javascripts/all* public/stylesheets/all* public/stylesheets/*.css config/database.yml *~ *#* .#* .DS_Store webrat-*.html

makandra dev
thoughtbot.com

Squirrel is an enhancement for ActiveRecord’s find method that allows programmers to query the database using a more Rubyish...

tagaholic.me

Rails’ script/console makes it easy to fetch, view and edit your database records. But can you edit those records as...

bark.metacasa.net

Unfortunately, by default plugin tests are pretty bland. They use the plain unit test suite supplied by Ruby, and not...

lambie.org

I’m working on a problem for a client which involves connecting to a Microsoft SQL Server 2005 database from...

code.google.com

MMM (MySQL Master-Master Replication Manager) is a set of flexible scripts to perform monitoring/failover and management of MySQL Master...

aub.github.com

Record Filter gives you the full power of ActiveRecord's query building tools with a heaping helping of DSL thrown...

github.com

Capistrano recipes for database backups before migrations, passenger deployment strategy, release tagging in Git repos.

github.com

Read_from_slave for Rails enables database reads from a slave database, while writes continue to go to the master