Earlier conditions can either be specified as a string or array now in edge rails we can specify hash also. So if we specify conditions as hash then it will generate conditions based on equality with SQL AND.
Example:
User.find(:all, :conditions=>{:first_name => ‘akhil’, :role => ‘admin’})
will generate SQL as “where `first_name` = ‘akhil’ and `role` = […]
Archive for February, 2007
I don’t know why it is not mentioned any where in rails api, it could be very useful for all.
This is straight from rails\activesupport\lib\active_support\core_ext\module\deligation.rb :
Provides a delegate class method to easily expose contained objects’ methods
as your own. Pass one or more methods (specified as symbols or strings)
and the name of the target object as the […]
Some days go I wrote a bash script for creating new rails project and initial SVN import (with ignoring/removing log/other files). And I received many comments if I could write a ruby script for this stuff. Hence here is the ruby script for creating new rails project and initial SVN import (with ignoring/removing log/other files) […]
Hey guys, finally i have released the captcha plugin for public usage.
Check it out here
So you want to setup production server with mongrel clusters and apache proxy balancer, also wants to use capistrano for deployment, huh. Take it easy, its very simple.
You need Apache 2.2 or later on your production server, and the following ruby gems on your both machine(server and local):
capistrano
mongrel
mongrel_cluster
I haven’t mentioned rails and rake gem as […]
