diff --git a/Gemfile b/Gemfile index 55cfd13..69f4027 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,8 @@ gem 'cancan' gem 'gravtastic', :git => 'https://github.com/chrislloyd/gravtastic.git' gem 'bb-ruby' +gem 'kaminari-bootstrap' + group :production do gem 'unicorn' end diff --git a/Gemfile.lock b/Gemfile.lock index 6268e86..77a1a0e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,6 +59,12 @@ GEM i18n (0.6.1) journey (1.0.4) json (1.7.6) + kaminari (0.14.1) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kaminari-bootstrap (0.1.3) + kaminari (>= 0.13.0) + rails kgio (2.8.0) mail (2.4.4) i18n (>= 0.4.0) @@ -133,6 +139,7 @@ DEPENDENCIES execjs forum_monster (~> 1.0.3) gravtastic! + kaminari-bootstrap mysql2 rails (= 3.2.11) sass-rails (~> 3.2.3) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 3b5b7cc..40c8ba0 100755 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -5,6 +5,9 @@ class TopicsController < ApplicationController def show @topic.hit! if @topic + @posts = @topic.posts.page(params[:page]).per(10) + #Kaminari.paginate_array(@topic).page(params[:page]).per(10) + @my_blockquote = { 'Quote' => [ /\[quote(:.*)?=(.*?)\](.*?)\[\/quote\1?\]/mi, diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 9b389c7..d76a792 100755 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -11,7 +11,7 @@
| @@ -41,6 +41,9 @@ <%end%> <% end %> |
<%= link_to "Back to Forum", forum_path(@topic.forum) %>