"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170215000001_telegram_support.rb" (25 Mar 2021, 540 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 "20170215000001_telegram_support.rb": 3.4.1_vs_3.5.0.

    1 class TelegramSupport < ActiveRecord::Migration[4.2]
    2   def up
    3 
    4     # return if it's a new setup
    5     return if !Setting.exists?(name: 'system_init_done')
    6 
    7     Permission.create_if_not_exists(
    8       name:        'admin.channel_telegram',
    9       note:        'Manage %s',
   10       preferences: {
   11         translations: ['Channel - Telegram']
   12       },
   13     )
   14 
   15     Ticket::Article::Type.create_if_not_exists(
   16       name:          'telegram personal-message',
   17       communication: true,
   18       updated_by_id: 1,
   19       created_by_id: 1,
   20     )
   21 
   22   end
   23 end