"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170418000001_validate_agent_limit.rb" (25 Mar 2021, 506 Bytes) of package /linux/www/zammad-4.0.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "20170418000001_validate_agent_limit.rb": 3.4.1_vs_3.5.0.

    1 class ValidateAgentLimit < ActiveRecord::Migration[4.2]
    2   def up
    3     # return if it's a new setup
    4     return if !Setting.exists?(name: 'system_init_done')
    5 
    6     Setting.create_if_not_exists(
    7       title:       'Set limit of agents',
    8       name:        'system_agent_limit',
    9       area:        'Core::Online',
   10       description: 'Defines the limit of the agents.',
   11       options:     {},
   12       state:       false,
   13       preferences: { online_service_disable: true },
   14       frontend:    false
   15     )
   16   end
   17 end