stackoverflow.com

Before Rails 3.2.14, when supplying an invalid locale to I18n, it would fall back to its config.i18n.default_locale (which is :en by default). Eventually, this will be changed to raise...

...an error by default -- for now, it shows a deprecation warning. Since Rails 3.2.14 and 3.2.15 did not include security updates, you might not have applied them and probably now...

If your rails application is unable to send mails, it might be useful to debug your settings using the rails console. Here is a snippet that shows the current settings...

requiremind.com

...similar flavor as AngularJS, but a lot less features and geared towards Ruby on Rails. The attached link leads to a tutorial for a small blog written with Rails / Batman.js...

gaslight.co

We’ve been working on one of our first Angular projects with a Rails backend. It’s been a great experience. I wanted to share a few things we learned...

...that we hope are helpful to others building Angular on Rails apps...

...fixing errors as they occur: Update gems as listed below, and bundle Boot a Rails console - see below for a list of changes you will probably need Run Specs with...

...constraints as possible. Boot the application in different environements to spot further issues, e.g. rails console staging Gem updates Replace ruby-debug with byebug or pry Replace mysql with mysql2...

weblog.rubyonrails.org

Rails 4.0 is finally ready after a thorough process of betas and release candidates. It's an amazing new version packed with new goodies and farewells to old features past...

github.com

The asset pipeline from Rails 3.1 packported to 2.3. By Michael Grosser from parallel_tests fame...

rails-erd.rubyforge.org

Gem to generate entity relationship diagrams from your Rails 3 ActiveRecord models. The diagram style is pretty and configurable...

We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2, but did not activitate the asset pipeline. Instead we used...

You probably need to activate X-Sendfile.

...which requires ApplicationController when loaded. When your ApplicationController requires later-loaded gems when loaded, Rails will not boot. Here is an example for an ApplicationController requiring Aegis::Controller from the...

...In this case aegis must be listed before resource_controller in your Gemfile or Rails will not boot...

...transactions and locking. Examples will be given for the ActiveRecord ORM (from Ruby on Rails), but apply to all technologies. Use transactions to group related changes Use a transaction to...

...than a single database row, you should always use a transaction. Note that in Rails, ActiveRecord::Base#save automatically opens a transaction. Hence changes you make in callbacks, nested attributes...

When using where.not with a Hash of multiple attributes, Rails applies logical NAND (NOT (A AND B)). This contrasts with logical NOR (NOT A AND NOT B), which is achieved...

Exception: Array arguments When a single key points to an Array of values, Rails applies standard SQL NOT IN logic. This behaves effectively as a NOR condition relative to...

rubysource.com

...a look at what you need to do to get your app ready for Rails...

codeodor.com

Code example for implementing Cross-Origin Resource Sharing (CORS) in Rails...

Don't you just hate to write Cucumber path helpers to be able to say this?

I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print you a pretty error message has a bug and sometimes...

...pointed to the actual problem. Possible causes discovered by looking at the logs A Rails plugin would require the sqlite3 gem, but that gem wasn't in the Gem bundle...

...all will run all RSpec examples and Cucumber features. The report will be written RAILS_ROOT/coverage/index.html. Here is what the task does in detail: Generates aggregated coverage of both RSpec...

Works with Rails 2 and Rails 3 Reports for app/**/*.rb and nothing else If called with an environment variable IGNORE_SHARED_TRAITS=true it ignores Modularity traits...

...column representing the filename of the file. To do this, add a new migration (rails g migration ) with the following content: class AddAttachmentToNotes < ActiveRecord::Migration[6.0] def change add_column...

...change the column details to fit your purpose. Run it. 1) Deliver attachments through Rails The first way is to store your Carrierwave attachments not in the default public/system, but...

...you need to make a static web page and find yourself missing all your Rails comforts, take a look at StaticMatic. This works like an extremely stripped down version of...

...Rails, giving you HAML SASS helpers partials When done, everything is simply compiled to static HTML and CSS, so no need to install anything on your server. If you receive...

gist.github.com

Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g. when trying to replicate a presumed bug in ActiveRecord with...

...Note that #origin_class it roughly equivalent to the blockless form of #unscoped from Rails 3.2+, but it works consistently across all Rails versions. #unscoped does not exist for Rails...

...and is broken in Rails...

guides.rubyonrails.org

When your Rails controller calls render, you can pass a :status option for the HTTP status code: render 'results', status: 400 All important status codes also have a symbol alias...

Do you have page caching enabled for the development environment and there are cached pages lying around in public/?