class ActiveAdmin::StringSymbolOrProcSetting

Many configuration options (Ex: site_title, title_image) could either be static (String), methods (Symbol) or procs (Proc). This wrapper takes care of returning the content when String or using instance_eval when Symbol or Proc.

Public Instance Methods

value(context = self) click to toggle source
# File lib/active_admin/dynamic_setting.rb, line 28
def value(context = self)
  case @setting
  when Symbol, Proc
    context.instance_eval(&@setting)
  else
    @setting
  end
end