aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-06-01 21:09:41 +0900
committerrhenium <re4k@re4k.info>2013-06-01 21:09:41 +0900
commitfb2a7041165e4cc0a6c488b3b78390ca98357169 (patch)
tree9495f2ef2ce0aa15b41bcaa8b7a46a5b6f51330d /app
parent5e0d231be08d95ac30746ad419db543cb5ccfe93 (diff)
downloadaclog-fb2a7041165e4cc0a6c488b3b78390ca98357169.tar.gz
update view tweets/_tweets.html.haml: no pagination links when no tweets
Diffstat (limited to 'app')
-rw-r--r--app/views/tweets/_tweets.html.haml17
1 files changed, 8 insertions, 9 deletions
diff --git a/app/views/tweets/_tweets.html.haml b/app/views/tweets/_tweets.html.haml
index d0030b2..882a735 100644
--- a/app/views/tweets/_tweets.html.haml
+++ b/app/views/tweets/_tweets.html.haml
@@ -1,9 +1,8 @@
-.tweets
- = render partial: "tweets/tweet", collection: @tweets.includes(:user), as: :tweet
-.loading
- = image_tag "loading.gif", alt: "loading...", title: nil
-.pagination
- - if params[:page]
- = link_to raw("Next &#8250;"), params.merge(page: params[:page].to_i + 1), rel: :next
- - elsif @tweets.last
- = link_to raw("Next &#8250;"), params.merge(max_id: @tweets.last.id - 1), rel: :next
+.tweets= render partial: "tweets/tweet", collection: @tweets.includes(:user), as: :tweet
+= if @tweets.count > 0
+ .loading= image_tag "loading.gif", alt: "loading...", title: nil
+ .pagination
+ - if params[:page]
+ = link_to raw("Next &#8250;"), params.merge(page: params[:page].to_i + 1), rel: :next
+ - elsif @tweets.last
+ = link_to raw("Next &#8250;"), params.merge(max_id: @tweets.last.id - 1), rel: :next