Module: Kadmin::ApplicationHelper
- Defined in:
- app/helpers/kadmin/application_helper.rb
Constant Summary collapse
- REDMINE_URL =
'https://redmine.offerista.com/projects/apps-services/issues/new'
Instance Method Summary collapse
-
#redmine_ticket_link(error) ⇒ String
URL to submit a new redmine ticket with prefilled params.
- #select2_tag(name, option_tags = nil, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#redmine_ticket_link(error) ⇒ String
Returns URL to submit a new redmine ticket with prefilled params.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/kadmin/application_helper.rb', line 9 def redmine_ticket_link(error) issue = { subject: "Error in #{controller.class.name} (#{error.class.name})" } issue[:description] = " Error while accessing \#{request.url} (originally \#{request.original_url})\n\n Error:\n <pre>\#{error.message}</pre>\n\n Description:\n !!! Add a description of what you were doing, what happened, and what did you expect to happen !!!\n EOS\n\n return \"\#{REDMINE_URL}?\#{{ issue: issue }.to_param}\"\nend\n" |
#select2_tag(name, option_tags = nil, options = {}, html_options = {}) ⇒ Object
26 27 28 29 |
# File 'app/helpers/kadmin/application_helper.rb', line 26 def select2_tag(name, = nil, = {}, = {}) _, = Kadmin::Select2.(.dup, .dup) return select_tag(name, , ) end |