"Fossies" - the Fresh Open Source Software Archive

Member "discourse-2.8.3/db/fixtures/003_post_action_types.rb" (14 Apr 2022, 1285 Bytes) of package /linux/www/discourse-2.8.3.tar.gz:


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.

    1 # frozen_string_literal: true
    2 
    3 PostActionType.seed do |s|
    4   s.id = PostActionType.types[:bookmark]
    5   s.name_key = 'bookmark'
    6   s.is_flag = false
    7   s.position = 1
    8 end
    9 
   10 PostActionType.seed do |s|
   11   s.id = PostActionType.types[:like]
   12   s.name_key = 'like'
   13   s.is_flag = false
   14   s.icon = 'heart'
   15   s.position = 2
   16 end
   17 
   18 if PostActionType.types[:off_topic]
   19   PostActionType.seed do |s|
   20     s.id = PostActionType.types[:off_topic]
   21     s.name_key = 'off_topic'
   22     s.is_flag = true
   23     s.position = 3
   24   end
   25 end
   26 
   27 if PostActionType.types[:inappropriate]
   28   PostActionType.seed do |s|
   29     s.id = PostActionType.types[:inappropriate]
   30     s.name_key = 'inappropriate'
   31     s.is_flag = true
   32     s.position = 4
   33   end
   34 end
   35 
   36 if PostActionType.types[:spam]
   37   PostActionType.seed do |s|
   38     s.id = PostActionType.types[:spam]
   39     s.name_key = 'spam'
   40     s.is_flag = true
   41     s.position = 6
   42   end
   43 end
   44 
   45 if PostActionType.types[:notify_user]
   46   PostActionType.seed do |s|
   47     s.id = PostActionType.types[:notify_user]
   48     s.name_key = 'notify_user'
   49     s.is_flag = true
   50     s.position = 7
   51   end
   52 end
   53 
   54 if PostActionType.types[:notify_moderators]
   55   PostActionType.seed do |s|
   56     s.id = PostActionType.types[:notify_moderators]
   57     s.name_key = 'notify_moderators'
   58     s.is_flag = true
   59     s.position = 8
   60   end
   61 end