Class: Decidim::Budgets::ProjectsController

Inherits:
ApplicationController show all
Includes:
NeedsCurrentOrder, Orderable, FilterResource, IconHelper
Defined in:
decidim-budgets/app/controllers/decidim/budgets/projects_controller.rb

Overview

Exposes the project resource so users can view them

Constant Summary

Constants included from IconHelper

IconHelper::DEFAULT_RESOURCE_TYPE_ICONS

Instance Method Summary collapse

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon, #resource_type_icon, #resource_type_icon_key, #text_with_resource_icon

Methods included from LayoutHelper

#_icon_classes, #apple_favicon, #application_path, #current_user_unread_data, #extended_navigation_bar, #external_icon, #favicon, #icon, #legacy_favicon, #organization_colors, #role

Methods included from TooltipHelper

#with_tooltip

Methods included from ModalHelper

#decidim_modal

Methods inherited from ApplicationController

#current_workflow, #voting_finished?, #voting_open?

Methods inherited from Components::BaseController

#current_component, #current_manifest, #current_participatory_space, #permission_class_chain, #permission_scope, #redirect_unless_feature_private, #set_component_breadcrumb_item, #share_token

Methods included from RegistersPermissions

register_permissions

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from Headers::HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#indexObject

Raises:

  • (ActionController::RoutingError)


14
15
16
# File 'decidim-budgets/app/controllers/decidim/budgets/projects_controller.rb', line 14

def index
  raise ActionController::RoutingError, "Not Found" unless budget
end

#showObject

Raises:

  • (ActionController::RoutingError)


18
19
20
21
# File 'decidim-budgets/app/controllers/decidim/budgets/projects_controller.rb', line 18

def show
  raise ActionController::RoutingError, "Not Found" unless budget
  raise ActionController::RoutingError, "Not Found" unless project
end