Class: Kaui::EngineController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Kaui::EngineController
- Defined in:
- app/controllers/kaui/engine_controller.rb
Direct Known Subclasses
AccountEmailsController, AccountTagsController, AccountTimelinesController, AccountsController, BundleTagsController, BundlesController, ChargebacksController, ChargesController, CreditsController, CustomFieldsController, HomeController, InvoiceItemsController, InvoicesController, PaymentMethodsController, PaymentsController, RefundsController, SubscriptionsController, TagDefinitionsController, TagsController, TransactionsController
Instance Method Summary collapse
- #current_ability ⇒ Object
-
#current_user ⇒ Object
Used for auditing purposes.
-
#options_for_klient(options = {}) ⇒ Object
Common options for the Kill Bill client.
Instance Method Details
#current_ability ⇒ Object
23 24 25 26 |
# File 'app/controllers/kaui/engine_controller.rb', line 23 def current_ability # Redefined here to namespace Ability in the correct module @current_ability ||= Kaui::Ability.new(current_user) end |
#current_user ⇒ Object
Used for auditing purposes
19 20 21 |
# File 'app/controllers/kaui/engine_controller.rb', line 19 def current_user super end |
#options_for_klient(options = {}) ⇒ Object
Common options for the Kill Bill client
7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/kaui/engine_controller.rb', line 7 def ( = {}) { # TODO Kaui doesn't support multi-tenancy yet :api_key => KillBillClient.api_key, :api_secret => KillBillClient.api_secret, :username => current_user.kb_username || KillBillClient.username, :password => current_user.password || KillBillClient.password, :session_id => current_user.kb_session_id }.merge() end |