Sha256: 032f5599729fa4f4c4b69bd2a72137294cb360ced51a67f1a7e68bdf098311be
Contents?: true
Size: 492 Bytes
Versions: 6
Compression:
Stored size: 492 Bytes
Contents
class FlashController < ApplicationController headerize_flash_for :json def show # show.html.erb end def redirect flash[params[:type].to_sym] = params[:message] redirect_to action: 'show' end def ajax respond_to do |wants| [:js, :json, :xml].each do |fmt| wants.send(fmt) { flash[params[:type].to_sym] = params[:message] flash[:skip_glow] = params[:skip_glow].present? head :ok } end end end end
Version data entries
6 entries across 4 versions & 1 rubygems