Commit 054043ed by liangyuzhe

自定义api controller

parent 6e91099e
class ApplicationController < ActionController::Base
class ApplicationController < ActionController::Metal
ActionController::API.without_modules(:ForceSSL, :UrlFor).each do |left|
include left
end
include RailsParam::Param
rescue_from StandardError, with: :rescue_all
include TokenValidate
def rescue_all(e)
ErrorLog.error(e)
......
class PushsController < ApplicationController
include ActionController::HttpAuthentication::Token
skip_before_action :verify_authenticity_token
# skip_before_action :verify_authenticity_token
def token
param! :app_name, String, required: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment