Sha256: 12f76631a72667bcdbb7037261061530f57cedf0ece00841716c21c6aa516062

Contents?: true

Size: 541 Bytes

Versions: 6

Compression:

Stored size: 541 Bytes

Contents

module Vulgata::ControllerConfigurable
  extend ActiveSupport::Concern

  included do
    helper_method :vulgata_current_user
  end

  def vulgata_current_user
    current_user
  end

  def vulgata_users
    # users that will appear in the "team" page
    # i.e User.where(role: 'translator')
    raise NotImplementedError
  end

  def suggest_translation text, from, to
    # i.e
    # suggestion = TranslationApi.translate(text, from, to)
    # render json: { suggestion: suggestion }, status: :ok
    raise NotImplementedError
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vulgata-0.3.7 app/controllers/concerns/vulgata/controller_configurable.rb
vulgata-0.3.6 app/controllers/concerns/vulgata/controller_configurable.rb
vulgata-0.3.5 app/controllers/concerns/vulgata/controller_configurable.rb
vulgata-0.3.4 app/controllers/concerns/vulgata/controller_configurable.rb
vulgata-0.3.3 app/controllers/concerns/vulgata/controller_configurable.rb
vulgata-0.3.1 app/controllers/concerns/vulgata/controller_configurable.rb