Class: Grindstone::PostsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/grindstone/posts_controller.rb

Constant Summary collapse

POST =
Grindstone::Post

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
14
# File 'app/controllers/grindstone/posts_controller.rb', line 6

def index
  post_count = params[:post_count] || 10
  begin
    @posts = Grindstone::Post.paginate(:page => params[:page],
      :per_page => post_count)
  rescue NoMethodError
    @posts = POST.all
  end
end

#showObject



16
17
# File 'app/controllers/grindstone/posts_controller.rb', line 16

def show
end