Rails: find controller for a path no comments
Huh, seems simple to do :p, but I’ve been seeking for a while to find the answer and dig into rails code to find a simple method to retrieve the controller of a given path (could be useful to build a navigation). There it is:
ActionController::Routing::Routes.recognize_path(path)[:controller]Ebb, even faster than Thin no comments
Ebb is new server to put in front of a rackable ruby application.
Have a look to the Ebb website to get some comparison with other app servers.
sudo gem install ebbWhat I needed to do before on Mac OS X (leopard with MacPorts):
sudo port install glib2Model inheritance with Merb no comments
from help on irc#merb
I had recurrent issue about inherit a model class from another one in Merb, using ActiveRecord or DataMapper. As it’s ‘magicly’ done on Rails I though the same way in Merb, but the last one load model class in alpha order. then what you have to do is to load the first class with a require:
in your first file:
class Page < ActiveRecord::Base
endthen in second add the require:
require 'page'
class ActivePage < Page
endSimply using ruby…
Most used front end: poll results no comments
For severals month now I put a poll about which front end people use for their website. Even if it s not a reference with only 85 votes I would like to publsih some result. Of course as the content of this website is ruby oriented, then the results will be also.
First it started with most of votes for apache. At the end Apache it’s still the first:
- 47%: apache
- 40%: nginx
- 7% : lighttpd
- 5% : others
The result for nginx is over general real stats but for the trend is here and nginx is more and more the choice for a ruby stack as I did present in my last post




