16 April 2014

The Ruby Reflector



  Source Favicon
By santiago.pastorino of WyeWorks Blog - The Team's Voice over 1 year ago.


Threadsafe on by default

Aaron Patterson's blog post

Discusion of Tony Arcieri's Pull Request

Improve eager load on Rails: Pull Request



Default headers

Security Guide's default headers

match doesn't catch all


Set escaping HTML in JSON encoding to true by default

Pull Request

Add ActiveSupport:: KeyGenerator as a simple wrapper …

blog.wyeworks.com Read
  Source Favicon
By iain hecker of Adventures with Ruby 2 years ago.

…Rails :: Railtie do console do | app | Bundler .require( :console ) Wirb .start Hirb .enable end end

This creates an anonymous Railtie in which you can specify what happens when the console is started. Here you can require all your console extensions and perform additional configuration.

Railties need to be loaded before you define your Rails application, or else you're too late and the console block won't be executed.

iain.nl Read
  Source Favicon
By spastorino of Riding Rails - home over 2 years ago.


Rails 2.3-style plugins in vendor/plugins are deprecated and will be removed in Rails 4.0. Move them out of vendor/plugins and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/ initializers/myplugin.rb. Santiago Pastorino

Guides are available as a single .mobi for the Kindle and free Kindle readers apps. Michael Pearson & Xavier Noria

Allow scaffold/model/migration generators to accept a "index" and "uniq" …

weblog.rubyonrails.org Read
  Source Favicon
By jonleighton of Riding Rails - home over 2 years ago.

Jon Leighton

Fix bug with referencing other mysql databases in set table name. GH 3690

Fix performance bug with mysql databases on a server with lots of other databses. GH 3678

Christos Zisopoulos and Kenny J


New apps should be generated with a sass-rails dependency of 3.1.5, not 3.1.5.rc.2

As ever, you can see a full list of changes on Github.

weblog.rubyonrails.org Read
  Source Favicon
By Andre Arko of Engine Yard Developer Blog over 3 years ago.

…doesn't really go into depth about what you can use Railties to do. Here are some example Railties explaining how to use the Railtie methods (in alphabetical order) to customize and extend Rails.

console The console method allows your Railtie to add code that will be run when a Rails console is started.

console do Foo.console_mode! end

generators Rails will require any generators defined in lib/generators/*.rb automatically. If you ship Rails::Generators with …

engineyard.com Read
  Source Favicon
By Simone Carletti of Simone Carletti's Blog over 3 years ago.

…lib/tasks and Railties instead . lib/tasks already works in Rails 2, Railties is a Rails 3 feature but you can use it in combination with the legacy init.rb file to preserve compatibility with both Rails 2 and Rails 3 versions.

Rails 3 upgrade

The steps above are not enough to make your project a real Rails 3 application, they are just a small subset of changes you should apply. The big difference which is also the main advantage compared with all the other changes, …

simonecarletti.com Read
  Source Favicon
By David of David Chelimsky almost 4 years ago.

Some questions have come up since I posted about rspec-rails-2 generators and rake tasks requiring that rspec-rails be declared in the :development group in a Gemfile. Here are a few of them, paraphrased, with answers:

Why the change?

rspec-rails now uses a Railtie to expose the rake tasks and generators. Railties allow Rails extensions to register themselves with Rails without having to copy files into your app. This makes installation and, especially, upgrades much easier to manage for both maintainers and users.

blog.davidchelimsky.net Read
  Source Favicon
By Gregg Pollack of Envy Labs almost 4 years ago.

…popular plugins simply don't work yet!). We'll spend a lot of time looking at building Railties, tying into Active Record, generating files with the new Rails generators, and more.

3. Abusing modularity - In this module (ha ha!), we'll look at how to exploit Rails new modularity in fun and interesting ways. We'll build a new router, build an app without a single real controller, and other fun things that while seemingly just hacks, can actually be really useful in …

blog.envylabs.com Read
  Source Favicon
By José Valim of Plataformatec Blog almost 4 years ago.

Integration award: Railties

Rails 3 has several improvements and not all of them may be visible to the application developer. One of the hidden unicorns is Railties test suite. As Yehuda stated in a blog post during the refactoring of version 2.3 to 3.0:

"Although the Rails initializer tests covered a fair amount of area, successfully getting the tests to pass did not guarantee that Rails booted."

This happened because, in order to have fast tests, Rails…

blog.plataformatec.com.br Read
  Source Favicon

…that right. While Rails itself ships with ActiveRecord as a default, the Railties gem, responsible for bootstrapping Rails, knows nothing about ActiveRecord. In order to achieve this, we had to make that bootstrapping process much more pluggable. While this is amazing for extensions, like DataMapper, that want to replace a built-in framework, it also exposes more functionality to any Rails extension distributed as a gem.

Rails:: Railtie

In short, Railties now coordinates the …

engineyard.com Read