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...
...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...
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...
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...
The asset pipeline from Rails 3.1 packported to 2.3. By Michael Grosser from parallel_tests fame...
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...
...treats cookies with SameSite=None like SameSite=Strict How to set a SameSite cookie Rails (session configuration) In config/initializers/session_store.rb, add the options secure: true, same_site: :strict|:lax. To set...
...none you need Rack 2 (i.e. Rails 5). Rails 6.1 will set SameSite=Lax; on default. Rails Custom cookies are set with cookies[:cookie_name] = 'value' or = { value: 'value', path...
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...
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...
...a look at what you need to do to get your app ready for Rails...
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...
...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...
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...
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/?
jQuery as new default Javascript library, streaming response support, attr_accessible with roles, prepared statements, easier migrations.
...by calling #dup on it: user = User.find(3) user.freeze unfrozen_user = user.dup Notes for Rails 2 users There is a bug in Rails 2.3.x where duping an ActiveRecord instance...
If you use a form (or form fields) multiple times inside one view, Rails will generate the same id attributes for fields again. This card presents you with a way...