Sha256: d293edb8b2f0a24a085b4076f0a42edb5d27bc978abc89aa3f401d9a729f7682
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # The UserProfile concern must be included in all the controllers # that are shown in the user's profile settings. It adds the # proper layout, as well as helper methods that help render the # side menu, amongst others. module UserProfile extend ActiveSupport::Concern include FormFactory delegate :user_groups, to: :current_user, prefix: false included do layout "layouts/decidim/user_profile" helper_method :available_authorization_handlers, :user_groups before_action :current_user authorize_resource :current_user end # Public: Available authorization handlers in order to conditionally # show the menu element. def available_authorization_handlers Decidim.authorization_handlers end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.0.5 | app/controllers/concerns/decidim/user_profile.rb |