Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get shouts displaying after polymorphic refactoring.
- Loading branch information
1 parent
1a69767
commit d1ddefe
Showing
5 changed files
with
5 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class TextShout < ActiveRecord::Base | ||
has_one :shout, as: :medium | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<%= content_tag_for(:div, shout) do %> | ||
<%= link_to shout.body, shout %> <%= time_ago_in_words(shout.created_at) %> ago | ||
<%= render shout.medium %> | ||
<%= time_ago_in_words(shout.created_at) %> ago | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= link_to text_shout.body, text_shout.shout %> |