Class: Gitlab::SlashCommands::Presenters::Base
- Inherits:
-
Object
- Object
- Gitlab::SlashCommands::Presenters::Base
- Includes:
- Routing
- Defined in:
- lib/gitlab/slash_commands/presenters/base.rb
Direct Known Subclasses
Access, Deploy, Error, Help, IncidentManagement::IncidentNew, IssueClose, IssueComment, IssueMove, IssueNew, IssueSearch, IssueShow, Run
Instance Method Summary collapse
- #display_errors ⇒ Object
-
#initialize(resource = nil) ⇒ Base
constructor
A new instance of Base.
Methods included from Routing
includes_helpers, redirect_legacy_paths, url_helpers
Constructor Details
#initialize(resource = nil) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/gitlab/slash_commands/presenters/base.rb', line 9 def initialize(resource = nil) @resource = resource end |
Instance Method Details
#display_errors ⇒ Object
13 14 15 16 17 |
# File 'lib/gitlab/slash_commands/presenters/base.rb', line 13 def display_errors = header_with_list("The action was not successful, because:", @resource.errors.) ephemeral_response(text: ) end |