Class: Elabs::ProjectsController
- Inherits:
-
ContentApplicationController
- Object
- ActionController::Base
- ElabsApplicationController
- ElabsPublicController
- ContentApplicationController
- Elabs::ProjectsController
- Defined in:
- app/controllers/elabs/projects_controller.rb
Constant Summary collapse
- ALLOWED_NESTED_FROM =
%w[language license tag user].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
-
#index ⇒ Object
GET /projects GET /projects.json.
-
#show ⇒ Object
GET /projects/1 GET /projects/1.json.
Methods inherited from ContentApplicationController
Instance Method Details
#index ⇒ Object
GET /projects GET /projects.json
10 11 12 |
# File 'app/controllers/elabs/projects_controller.rb', line 10 def index @projects = scope_request(Project.published).page(params[:page]).per(self.class::MAX_ITEMS_PER_PAGE) end |
#show ⇒ Object
GET /projects/1 GET /projects/1.json
16 17 18 19 20 21 |
# File 'app/controllers/elabs/projects_controller.rb', line 16 def show @project_albums = @project.albums.for_relation @project_articles = @project.articles.for_relation @project_notes = @project.notes.for_relation @project_uploads = @project.uploads.for_relation end |