Module: MicroAuth::AppsHelper

Defined in:
app/helpers/micro_auth/apps_helper.rb

Instance Method Summary collapse

Instance Method Details

#app_active_badge(app) ⇒ ActiveSupport::SafeBuffer

Builds & returns a tag-style badge indicating whether a specified app is active for use or not.

Parameters:

Returns:

  • (ActiveSupport::SafeBuffer)

    A badge; the result of a TagBuilder.



6
7
8
9
# File 'app/helpers/micro_auth/apps_helper.rb', line 6

def app_active_badge(app)
  tag.span app.active? ? 'active' : 'inactive',
           class: "badge is-tag #{app.active? ? 'is-green' : 'is-red'}"
end