Sha256: 0054891631028716ca934ab7b8879e836bd8165551a70f3c13aa8057f05d3feb

Contents?: true

Size: 543 Bytes

Versions: 7

Compression:

Stored size: 543 Bytes

Contents

module FrontEndBuilds
  class ApplicationController < ActionController::Base

    def use_params(param_method)
      v = Rails::VERSION::MAJOR
      send("#{param_method}_rails_#{v}")
    end

    # Public: A quick helper to create a respond_to block for
    # returning json to the client. Used because `respond_with`
    # is no longer included in Rails.
    def respond_with_json(object, options = {})
      respond_to do |format|
        format.json do
          render options.merge(json: object)
        end
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
front_end_builds-0.0.26 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.25 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.24 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.23 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.21 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.20 app/controllers/front_end_builds/application_controller.rb
front_end_builds-0.0.19 app/controllers/front_end_builds/application_controller.rb