Sha256: 7fb613c93febbfceb0f3bf37f2246af03e42a28d45073242dc5040a5e38c0e2d

Contents?: true

Size: 667 Bytes

Versions: 6

Compression:

Stored size: 667 Bytes

Contents

module Locomotive
  module Api
    class ContentTypesController < BaseController

      def index
        @content_types = current_site.content_types
        respond_with(@content_types)
      end

      def create
        @content_type = current_site.content_types.create(params[:content_type])
        respond_with @content_type, :location => main_app.locomotive_api_content_types_url
      end

      def update
        @content_type = current_site.content_types.find(params[:id])
        @content_type.update_attributes(params[:content_type])
        respond_with @content_type, :location => main_app.locomotive_api_content_types_url
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc7 app/controllers/locomotive/api/content_types_controller.rb
locomotive_cms-2.0.0.rc6 app/controllers/locomotive/api/content_types_controller.rb
locomotive_cms-2.0.0.rc5 app/controllers/locomotive/api/content_types_controller.rb
locomotive_cms-2.0.0.rc4 app/controllers/locomotive/api/content_types_controller.rb
locomotive_cms-2.0.0.rc2 app/controllers/locomotive/api/content_types_controller.rb
locomotive_cms-2.0.0.rc1 app/controllers/locomotive/api/content_types_controller.rb