Module: Doorkeeper::DashboardHelper

Defined in:
app/helpers/doorkeeper/dashboard_helper.rb

Instance Method Summary collapse

Instance Method Details

#doorkeeper_errors_for(object, method) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'app/helpers/doorkeeper/dashboard_helper.rb', line 2

def doorkeeper_errors_for(object, method)
  if object.errors[method].present?
    object.errors[method].map do |msg|
      (:span, class: 'help-block') do
        msg.capitalize
      end
    end.reduce(&:join).html_safe
  end
end

#doorkeeper_submit_path(application) ⇒ Object


12
13
14
# File 'app/helpers/doorkeeper/dashboard_helper.rb', line 12

def doorkeeper_submit_path(application)
  application.persisted? ? oauth_application_path(application) : oauth_applications_path
end