Sha256: 1cc93da5a328bf4e3a5aad4d979a931a077083a81afe59c014257ae7a6fb6270

Contents?: true

Size: 1.14 KB

Versions: 6

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

6 entries across 6 versions & 1 rubygems

Version Path
card-1.16.15 tmpsets/set/mod007-05_standard/self/all.rb
card-1.16.14 tmpsets/set/mod007-05_standard/self/all.rb
card-1.16.13 tmpsets/set/mod007-05_standard/self/all.rb
card-1.16.12 tmpsets/set/mod007-05_standard/self/all.rb
card-1.16.11 tmpsets/set/mod007-05_standard/self/all.rb
card-1.16.10 tmpsets/set/mod007-05_standard/self/all.rb