Permalink
Browse files

Update list of tweets

  • Loading branch information...
twata701 committed Feb 18, 2014
1 parent e5daa47 commit 9065e2fb6f17682df48738f3720ac69ad89c3ed7
@@ -1,3 +1,22 @@
// Place all the styles related to the Tweets controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.tweets {
border-bottom: 1px dotted #ccc;
padding: 10px 15px 5px 20px;
position: relative;
.tweet-text {
font-size: 108%;
color: #444;
line-height: 1.4;
margin-bottom: 6px;
word-wrap: break-word;
word-break: break-all;
}
.tweet-date {
color: #999;
font-size: 13px;
}
}
@@ -0,0 +1,4 @@
<div class="tweets">
<p class="tweet-text"><%= tweet.text %></p>
<p class="tweet-date"><%= tweet.timestamp.strftime("%Y-%m-%d %H:%M:%S") %></p>
</div>
@@ -1,43 +1,5 @@
<h1>Listing tweets</h1>
<h1>ツイート一覧</h1>
<table class="table">
<thead>
<tr>
<th>Tweet</th>
<th>In reply to status</th>
<th>In reply to user</th>
<th>Timestamp</th>
<th>Source</th>
<th>Text</th>
<th>Retweeted status</th>
<th>Retweeted status user</th>
<th>Retweeted status timestamp</th>
<th>Expanded urls</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @tweets.each do |tweet| %>
<tr>
<td><%= tweet.tweet_id %></td>
<td><%= tweet.in_reply_to_status_id %></td>
<td><%= tweet.in_reply_to_user_id %></td>
<td><%= tweet.timestamp %></td>
<td><%= tweet.source %></td>
<td><%= tweet.text %></td>
<td><%= tweet.retweeted_status_id %></td>
<td><%= tweet.retweeted_status_user_id %></td>
<td><%= tweet.retweeted_status_timestamp %></td>
<td><%= tweet.expanded_urls %></td>
<td><%= link_to 'Show', tweet %></td>
<td><%= link_to 'Edit', edit_tweet_path(tweet) %></td>
<td><%= link_to 'Destroy', tweet, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<%= render(@tweets) %>
<%= paginate (@tweets) %>
View
@@ -14,7 +14,7 @@ class Application < Rails::Application
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
config.time_zone = 'Tokyo'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]

0 comments on commit 9065e2f

Please sign in to comment.