Class: Admin::PostsController

Inherits:
AdminController
  • Object
show all
Includes:
LockableEntity, ToggleableEntity
Defined in:
app/controllers/admin/posts_controller.rb

Overview

Administrative part for posts management

Instance Method Summary collapse

Instance Method Details

#imagesObject

get /admin/posts/:id/images



21
22
23
# File 'app/controllers/admin/posts_controller.rb', line 21

def images
  @collection = @entity.post_images.list_for_administration
end

#indexObject

get /admin/posts



11
12
13
14
# File 'app/controllers/admin/posts_controller.rb', line 11

def index
  @filter = params[:filter] || {}
  @collection = Post.page_for_administration(current_page, @filter)
end

#searchObject

get /admin/posts/search?q=



26
27
28
# File 'app/controllers/admin/posts_controller.rb', line 26

def search
  @collection = params.key?(:q) ? search_posts(param_from_request(:q)) : []
end

#showObject

get /admin/posts/:id



17
18
# File 'app/controllers/admin/posts_controller.rb', line 17

def show
end