Permalink
Browse files

Passing variables to the partials

  • Loading branch information...
1 parent 20c76eb commit 9c70e15cf68030bf13e19a6cf1b9e7bc979a5323 @squiter committed May 10, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 app/views/commons/_codes.haml
  2. +2 −2 app/views/commons/_musics.haml
  3. +2 −2 app/views/home/index.html.haml
@@ -1,8 +1,8 @@
%h3
Estou desenvolvendo
-- if @projects
+- if projects
%ul
- - @projects.each do |p|
+ - projects.each do |p|
%li
%a{:href => p.html_url, :target => '_blank'}
%span.img
@@ -1,8 +1,8 @@
%h3
Estou ouvindo
-- if @musics
+- if musics
%ul
- - @musics.each do |m|
+ - musics.each do |m|
%li
%a{ :href => m['url'], :target => '_blank'}
%span.img
@@ -7,6 +7,6 @@
.writting
= render :partial => 'commons/blogs'
.coding
- = render :partial => 'commons/codes'
+ = render :partial => 'commons/codes', :locals => { :projects => @projects }
.listening
- = render :partial => 'commons/musics'
+ = render :partial => 'commons/musics', :locals => { :musics => @musics }

0 comments on commit 9c70e15

Please sign in to comment.