Module: Vulgata::ControllerConfigurable
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationController
- Defined in:
- app/controllers/concerns/vulgata/controller_configurable.rb
Instance Method Summary collapse
- #suggest_translation(text, from, to) ⇒ Object
- #vulgata_current_user ⇒ Object
- #vulgata_users ⇒ Object
Instance Method Details
#suggest_translation(text, from, to) ⇒ Object
18 19 20 21 22 23 |
# File 'app/controllers/concerns/vulgata/controller_configurable.rb', line 18 def suggest_translation text, from, to # i.e # suggestion = TranslationApi.translate(text, from, to) # render json: { suggestion: suggestion }, status: :ok raise NotImplementedError end |
#vulgata_current_user ⇒ Object
8 9 10 |
# File 'app/controllers/concerns/vulgata/controller_configurable.rb', line 8 def vulgata_current_user current_user end |
#vulgata_users ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/concerns/vulgata/controller_configurable.rb', line 12 def vulgata_users # users that will appear in the "team" page # i.e User.where(role: 'translator') raise NotImplementedError end |