Class: Elabs::AlbumsController

Inherits:
ContentApplicationController show all
Defined in:
app/controllers/elabs/albums_controller.rb

Constant Summary collapse

ALLOWED_NESTED_FROM =
%w[language license tag user project].freeze
ALLOWED_ORDER_FROM =
%w[name published_at updated_at].freeze

Constants inherited from ContentApplicationController

ContentApplicationController::DEFAULT_ORDER, ContentApplicationController::IS_NSFW_FILTERABLE

Constants inherited from ElabsPublicController

ElabsPublicController::DEFAULT_ORDER, ElabsPublicController::IS_NSFW_FILTERABLE, ElabsPublicController::MAX_ITEMS_PER_PAGE

Instance Method Summary collapse

Methods inherited from ContentApplicationController

#create_comment

Instance Method Details

#indexObject

GET /albums GET /albums.json



10
11
12
# File 'app/controllers/elabs/albums_controller.rb', line 10

def index
  @albums = scope_request(Album.published).page(params[:page]).per(self.class::MAX_ITEMS_PER_PAGE)
end

#showObject

GET /albums/1 GET /albums/1.json



16
# File 'app/controllers/elabs/albums_controller.rb', line 16

def show; end