fixes #1542; fix typo; link to news update creator

This commit is contained in:
Toks
2013-05-04 20:19:44 -04:00
parent 4fe7437b9c
commit 26c774bd84
3 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
div#c-news-updates {
div#a-edit, div#a-new {
.hint {
display: block;
}
}
}

View File

@@ -1,6 +1,6 @@
class NewsUpdate < ActiveRecord::Base
belongs_to :creator, :class_name => "User"
belongs_to :udpater, :class_name => "User"
belongs_to :updater, :class_name => "User"
scope :recent, order("created_at desc").limit(5)
before_validation :initialize_creator, :on => :create
before_validation :initialize_updater

View File

@@ -13,7 +13,7 @@
<tbody>
<% @news_updates.each do |news_update| %>
<tr id="news-update-<%= news_update.id %>">
<td><%= news_update.creator.name %></td>
<td><%= link_to_user news_update.creator %></td>
<td><%= news_update.message %></td>
<td><%= link_to "Edit", edit_news_update_path(news_update) %> | <%= link_to "Delete", news_update_path(news_update), :method => :delete %></td>
</tr>