Sha256: 7e2ac0a1c5e616f48a6f932374b1b84652c3cf96617a231c9f20b98280b903f4

Contents?: true

Size: 687 Bytes

Versions: 1

Compression:

Stored size: 687 Bytes

Contents

module AboutPage
  class AboutController < ApplicationController
    before_filter :only => :index do
      AboutPage.configuration.preflight(request)
    end

    def index
      @configuration = AboutPage.configuration

      @configuration = @configuration.select { |key, value| (params[:filter].split(/[\W\+]/) + ["app"]).include? key.to_s } if params[:filter]
      @configuration.set_headers!(response)

      respond_to do |format|
        format.html { render :status => @configuration.ok? ? 200 : 417 } # about_page.html.erb
        format.json { render :json => @configuration.to_json }
        format.xml  { render :xml  => @configuration.to_xml }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
about_page-0.0.2 app/controllers/about_page/about_controller.rb