decko-commons/decko

View on GitHub
mod/account/set/right/status.rb

Summary

Maintainability
A
0 mins
Test Coverage
include_set Abstract::AccountField
include_set Abstract::List

assign_type :phrase

format :html do
  def input_type
    :radio
  end
end

def option_names
  %w[unapproved unverified active blocked] # system
end

def ok_to_update?
  if own_account? && !Auth.always_ok?
    deny_because you_cant(t(:account_deny_not_change_own_account))
  else
    super
  end
end