Monday, February 16, 2009

creating a directory using ruby

Creates a directory and all its parent directories. For example,

FileUtils.mkdir_p '/usr/local/lib/ruby'

causes to make following directories, if it does not exist.

* /usr
* /usr/local
* /usr/local/lib
* /usr/local/lib/ruby

You can pass several directories at a time in a list.



Wednesday, February 4, 2009

submit_tag will be override the functionality reset in Rails.

Eg: Reset tag in Rails
<%= submit_tag "Reset", :name => 'reset', :type => 'reset', :id => 'task_reset' %>