Monthly Archives: May 2009

Intresting String inflections in rails

* camelcase * camelize * classify * constantize * dasherize * demodulize * foreign_key * humanize * parameterize * pluralize * singularize * tableize * titlecase * titleize * underscore camelcase(first_letter = :upper) Alias for camelizecamelize(first_letter = :upper) By default, … Continue reading

Posted in Ruby | Tagged , | 1 Comment

Render partial or view from another controller

To render view from another controller # In rail 2.3render “controller/action” # In rails 2.2 or belowrender :template => ‘controller/action’ To render partial from another controller’s views folder render :partial => “controller/partial” Cheers !Sandip

Posted in Ruby on Rails | Tagged , | Leave a comment

vi / vim Shortcuts

Open filevi filenameAs i am newb on linux macine, i dont know vi shortcuts.so, i am listing down shortcuts which i am getting familier. :) Insert in filei Exit fileq forced exitq! save filewq forced savewq! Copy no of linesyy … Continue reading

Posted in General | Tagged , | 2 Comments