Featured
-
Installing RVM and Creation of Gemsets Part 2
In the last tutorial we learnt how to install RVM.
by dinesh.singh -
Installing RVM and Creating of Gemsets Part 1
Installing RVM and creating Gemsets can be difficu
by dinesh.singh -
Use pik in Windows
Managing multiple versions of Ruby on Windows can
by anirudh.rautela -
Using Bundler in Rails 2.3.x app
Managing Gems in Rails can be infuriating at times
by anirudh.rautela
Tags
Applying partials to layouts in rails
In Rails we can use partials to organize our code in the layouts . This is generally helpful when we have layouts running up to hundreds of lines. For example we have a top nav bar which looks different for logged in and non logged in user. Then ...
Use of :as in Passing parameters to rails partials
While passing objects to partial we can change the name of the local variable in the partial and for that purpose we need to use the :as option.
For example we have a partial _account.html.erb where we need to pass a collection @cutomers a...
Partials in Rails Application
Partials allow us to easily organize and reuse our view code in a Rails application. Partial file names typically start with an underscore (_) and generally end in the .html.erb extension as our views. The .erb extension may vary depending on tem...