ruby · Ruby On Rails

TaskJungler for maintaining todo list

TaskJungler is a gem available for Ruby. TaskJuggler is a modern and powerful project management tool. Its new approach to project planning and tracking is far superior to the commonly used Gantt chart editing tools. TaskJuggler uses one or more text files to describe a project. The main project should be placed in a file with the… Continue reading TaskJungler for maintaining todo list

MySQL · ruby · Ruby On Rails

Count, Size & Length methods. Which one to use where? What’s the difference between these?

Even the experienced developers will struggle to answer this correctly. Where to use count method? Where to use size method? Where to use length method? What is the difference among these? What is the advantages/disadvantages of using this? Which one is effective in using which areas? etc…, Find the answer below for the above questions… Continue reading Count, Size & Length methods. Which one to use where? What’s the difference between these?

ruby · Ruby On Rails

Extracting the URL into several parts, in RoR

  From the following example we can notice that the values of headers are coming in a HASH and from there it can be extracted easily. URL : http://localhost:3000/user/login?client_id=70104c672f9bf60561a7f16ade1216a3&scope=DC,TL&id=123456&redirect_url=http://google.com Headers (request.headers) :   {“HTTP_HOST”=>”localhost:3000”, “HTTP_ACCEPT”=>”text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8”, “SERVER_NAME”=>”localhost”, “rack.session”=>{:session_id=>”7aad641cdd3c586d8112302977101ce0”}, “rack.url_scheme”=>”http”, “REQUEST_PATH”=>”/user/login”, “HTTP_USER_AGENT”=>”Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8”, “HTTP_KEEP_ALIVE”=>”115”, “rack.errors”=>#<IO:0xb76e6560>, “HTTP_ACCEPT_LANGUAGE”=>”en-us,en;q=0.5”, “SERVER_PROTOCOL”=>”HTTP/1.1”, “action_controller.request.request_parameters”=>{}, “rack.version”=>[1, 0], “rack.run_once”=>false, “SERVER_SOFTWARE”=>”Mongrel 1.1.5”, “PATH_INFO”=>”/user/login”, “REMOTE_ADDR”=>”127.0.0.1”,… Continue reading Extracting the URL into several parts, in RoR