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