Skip to content
Browse files

updating syntax

  • Loading branch information...
1 parent 13c6f39 commit c12599a9987183af4048af24599450b37d409128 @mschoch mschoch committed
View
2 app/views/admin/articles/edit.html.haml
@@ -1,2 +1,2 @@
-%h1= "Edit #{@article['title']}"
+%h1= "Edit #{@article.title}"
= render "form"
View
10 app/views/admin/articles/index.html.haml
@@ -17,13 +17,13 @@
%tbody
- @articles.each do |article|
%tr
- %td= link_to(article['title'], article_path(article.id))
- %td= article['type']
- %td= article['authors'].first['name']
+ %td= link_to(article.title, article_path(article.id))
+ %td= article.type
+ %td= article.authors.first['name']
%td= "n/a"
%td
- - article['categories'].each do |category|
- = "#{category}#{unless category == article['categories'].last then ',' end}"
+ - article.categories.each do |category|
+ = "#{category}#{unless category == article.categories.last then ',' end}"
%div.clearfix
= link_to "Edit", edit_admin_article_path(article.id), :class => "btn btn-mini pull-right"
= button_to "Delete", admin_article_path(article.id), :method => "delete", :class => "btn btn-mini pull-right"
View
2 app/views/articles/_image.html.haml
@@ -1,4 +1,4 @@
%div
- %img.image{:src => @article['content']}
+ %img.image{:src => @article.content}
= render "tags"
= render "contributors"
View
2 app/views/articles/_video.html.haml
@@ -1,4 +1,4 @@
%div
- %video{:src => @article['content'], :controls => true}
+ %video{:src => @article.content, :controls => true}
= render "tags"
= render "contributors"

0 comments on commit c12599a

Please sign in to comment.
Something went wrong with that request. Please try again.