app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def not_allowed
      render :status => 422, :format => [:html], :layout => false, file: "#{Rails.root}/public/422.html"
    end
def not_allowed render :status => 422 , :format => [ :html ] , :layout => false , file : "#{Rails.root}/public/422.html" end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .
#redirect_to "/422"  #respond_to do |format| #  format.html { render file: "#{Rails.root}/public/422", layout: false, status: 422 } #end