Using ENUMs with Rails - See John Code
Rails can swap a varchar column for an ENUM without changing application code, reducing risk when tightening database constraints.
Configuration for Rails, the Right Way
Rails 3 lets applications define custom configuration elements directly, avoiding extra gems or plugins for miscellaneous settings.
Making the rails 3.1. asset pipeline and asset precompiling work in production mode
Rails 3.1 asset pipeline issues in production can break precompiling, fingerprinting, and stylesheet rendering when Haml, Sass, and Compass are involved.
Riding Rails: Rails 3.0: It's ready!
Rails 3.0 has been underway for a good two years, so it’s with immense pleasure that we can declare it’s finally here. We’ve brought the work of more than 1,600 contributors together to make everything better, faster, cleaner, and more beautiful.
RailsLab .:. Scaling Rails - Scaling Rails Screencasts
Learn everything you need to know about Scaling your Rails app through 13 informative Screencasts produced by Gregg Pollack with the support of New Relic.
Building and Scaling a Startup on Rails: 12 Things We Learned the Hard Way - Axon Flux - A Ruby on Rails Blog
There are a bunch of basic functional elements to building out a popular Rails app that I've never really seen explained in one place, but we had to learn the hard way while building Posterous.
Ruby on Rails Tutorial: Learn Rails by Example | by Michael Hartl
A thorough introduction to web development with Ruby on Rails
ActiveRecord 3+ auto-converts times to UTC by default. Hilarity ensues.
Rails 3 auto-converts ActiveRecord times to UTC by default, which can break code using Time.now or Time.parse; local time and non-aware attributes restore the older behavior.
Migrations are versioned in Rails 5 | BigBinary Blog
Rails 5 migration classes are versioned with ActiveRecord::Migration[5.0] so the migration API can evolve without breaking historical files in db/migrate.
Using PostgreSQL and jsonb with Ruby on Rails
jsonb in PostgreSQL 9.4 stores JSON differently from json and suits queries, indexing, and Rails 4.2 integration better for many use cases.
Locale: Localisation for Rails developers
Rails localisation can be managed with remotely editable translations, simplifying updates for multilingual applications without redeploying code.
Webrat doesn't follow redirect because it considers the url external
Absolute URLs in Rails tests can be treated as external because the host is unknown, breaking redirect handling in Webrat. Use path-only matching or reset Webrat to the local site.
Rails: How to provide a public link in a mail
Public file links in email can lose host and port information; combining root_url with a CarrierWave file path keeps contract URLs usable in mailers.
Rails: How to use a n:m association as 1:n association
A join model can enforce a single associated record when a foreign key on the target model is not possible; validates_uniqueness_of on the join row limits the relation to one.
Error during Rails 5 upgrade: Environment data not found in the schema
Rails 5 upgrade can fail when the database schema lacks configured environment data, especially during parallel test database migration.
Katapult EOL
Katapult reduced the effort of bootstrapping Rails apps, but its maintenance cost outweighed the gains and development has ended.
Rails 4.2 Foreign Key Support
Database constraints for comments and users help enforce referential integrity, but support is limited to certain adapters and can surface ActiveRecord::InvalidForeignKey errors.
Customize path for Capybara "show me the page" files
Capybara's save_and_open_page files can clutter the Rails root when debugging Cucumber scenarios. Set Capybara.save_and_open_page_path to store them elsewhere.
markbates/coffeebeans
When CoffeeScript was added to Rails 3.1 they forgot one very important part, the ability to use it when responding to JavaScript (JS) requests!
In Rails 3.1 it’s incredibly easy to build your application’s JavaScript using CoffeeScript, however if you fire off an AJAX request to your application you can only write your response using regular JavaScript and not CoffeeScript, at least until CoffeeBeans came along.
HTTP 302 redirects for PATCH or DELETE will not redirect with GET
Browsers may keep PATCH and DELETE on 302 redirects instead of switching to GET, breaking AJAX flows. Use 303 See Other or POST method override to force a GET follow-up.
Rails: Postgres Partial Indexing
PostgreSQL partial indexes reduce index size and write overhead by indexing only rows that match a condition, useful for conditional uniqueness and large tables.
RSpec: Change the type of a spec regardless of the folder it lives in
Rails specs can get controller, model, or request helpers from directory-based inference; :type forces the desired context even when a file lives elsewhere.
Ruby, Rails, Web2.0 » Blog Archive » Great Ruby on Rails REST resources
I have been playing around with RESTful Rails recently. Below is my collection or Rails REST howtos, tutorials and other resources I have found so far.
iPhone on Rails and ObjectiveResource; Making communication between the iPhone and a Rails web-service pain-free.
ObjectiveResource is an Objective-C port of Ruby on Rails' ActiveResource. It provides a way to serialize objects to and from Rails' standard RESTful web-services (via XML or JSON) and handles much of the complexity involved with invoking web-services of any language from the iPhone.