Sha256: 378c2c63a7aeccacbec46cb2d40ed0574c3b1ce73e2d072031bb6bf5a258ad10

Contents?: true

Size: 456 Bytes

Versions: 51

Compression:

Stored size: 456 Bytes

Contents

module Rao
  module ServiceController::ServiceConcern
    extend ActiveSupport::Concern

    included do
      helper_method :service_class
    end

    def service_class
      unless self.class.respond_to?(:service_class)
        raise "undefined method `service_class' for #{self.class.name}: Add a service_class method to your controller. Example: def self.service_class; MyAmazingService; end"
      end
      self.class.service_class
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
rao-service_controller-0.0.52.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.51.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.50.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.49.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.48.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.47.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.46.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.45.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.44.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.43.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.42.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.41.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.40.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.39.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.38.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.37.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.36.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.35.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.34.pre app/concerns/rao/service_controller/service_concern.rb
rao-service_controller-0.0.33.pre app/concerns/rao/service_controller/service_concern.rb