Sha256: aedc922155aa3004cf5a3c6d048fac450d4deb8844a4610dadd2d366e28afacf

Contents?: true

Size: 345 Bytes

Versions: 5

Compression:

Stored size: 345 Bytes

Contents

module Pwb
  class Api::V1::ThemesController < ApplicationApiController
    def index
      themes = Theme.all
      # Theme is active_hash so have to manually construct json
      @themes_array = []
      themes.each do |theme|
        @themes_array.push theme.as_json["attributes"]
      end
      render json: @themes_array
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pwb-1.4.0 app/controllers/pwb/api/v1/themes_controller.rb
pwb-1.3.0 app/controllers/pwb/api/v1/themes_controller.rb
pwb-1.2.0 app/controllers/pwb/api/v1/themes_controller.rb
pwb-1.1.1 app/controllers/pwb/api/v1/themes_controller.rb
pwb-1.0.0 app/controllers/pwb/api/v1/themes_controller.rb