Skip to content

Commit

Permalink
* New yield for css: content_for :css {}
Browse files Browse the repository at this point in the history
* Wrap delete update on views#_updates in .remove-update
* Link in update.css
  • Loading branch information
Zachary Scott committed Mar 26, 2011
1 parent 0080bc2 commit 41c5afd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions views/_head.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- css.each do |file|
%link{:href => "/css/#{file}.css", :media => "screen", :rel => "stylesheet"}

!= yield_content :css

- if production?
:javascript
var _gaq = _gaq || [];
Expand Down
11 changes: 7 additions & 4 deletions views/_updates.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
%a.reply{:href => "/?reply=#{update.id}"} reply

- if current_user and update.author.id == current_user.author.id
%form{:method => "post", :action => "/updates/#{update.id}"}
%input{:type => "hidden", :name => "_method", :value => "delete"}
%input.remove-update{:type => "submit", :value => "I Regret This"}
.remove-update
%form{:method => "post", :action => "/updates/#{update.id}"}
%input{:type => "hidden", :name => "_method", :value => "delete"}
%input.remove-update{:type => "submit", :value => "I Regret This"}

- if updates.empty?
.empty
There's no updates here yet


- content_for :css do
%link{:href=>"/css/update.css", :media=>"screen", :rel=>"stylesheet"}
- content_for :javascript do
%script{:src=>"/js/updates.show.js"}

0 comments on commit 41c5afd

Please sign in to comment.