• RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Ever tried Rails.root

Guys, have you ever tried Rails.root. It gives same value as RAILS_ROOT. But now in edge rails it is modified and you can do much more with it.

You can use Rails.root at places like:

 File.join(RAILS_ROOT, 'public', 'images')

as

 Rails.root.join('public', 'images')

Both gives the same result.

Enjoy…


Could not start application xmerl: ...

sudo apt-get install erlang-xmerl can solve following exception while starting ...

Creating command line programs in E...

Note: This is a very basic example of mix tool ...

My first version of Ping-Pong in El...

Recently I have started spending some of my time with ...

Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

https://twitter.com/bansalakhil/status/256699237230845952

Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

https://twitter.com/bansalakhil/status/256699237230845952

Action and Page caching has been ex...

With the commit c82cf81f00f Action and Page caching has been extracted ...

turbo-sprockets-rails3: Speeds up ...

http://twitter.com/bansalakhil/status/253420357841723393

EdgeRails: ActiveRecord::SessionSto...

With the commit 3324e28804 ActiveRecord::SessionStore is extracted out of Rails into ...