Sha256: 4dcdcca63996257d42872117d50cbd09fc8b7a3b3c28a8c439a93bdb69dbe891
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
# -*- encoding : utf-8 -*- class Card; module Set; module Self; module All; extend Card::Set # ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/all.rb ~~~~~~~~~~~ event :admin_tasks, :on=>:update, :before=>:approve do if task = Env.params[:task] if Auth.always_ok? case task.to_sym when :clear_cache ; Card::Cache.reset_global; Card::ViewCache.reset when :repair_references ; Card::Reference.repair_all when :empty_trash ; Card.empty_trash when :clear_view_cache ; Card::ViewCache.reset when :delete_old_revisions ; Card::Action.delete_old when :delete_old_sessions if months = Env.params[:months].to_i and months > 0 ActiveRecord::SessionStore::Session.delete_all ["updated_at < ?", months.months.ago] end end Env.params[:success] = Card[:stats].name abort :success else raise Card::PermissionDenied.new(self) end end end # ~~~~~~~~~~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/all.rb ~~~~~~~~~~~ end;end;end;end;
Version data entries
5 entries across 5 versions & 1 rubygems