"Fossies" - the Fresh Open Source Software Archive

Member "discourse-3.2.0/db/fixtures/003_post_action_types.rb" (30 Jan 2024, 1149 Bytes) of package /linux/www/discourse-3.2.0.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[:like]
    5   s.name_key = "like"
    6   s.is_flag = false
    7   s.icon = "heart"
    8   s.position = 2
    9 end
   10 
   11 if PostActionType.types[:off_topic]
   12   PostActionType.seed do |s|
   13     s.id = PostActionType.types[:off_topic]
   14     s.name_key = "off_topic"
   15     s.is_flag = true
   16     s.position = 3
   17   end
   18 end
   19 
   20 if PostActionType.types[:inappropriate]
   21   PostActionType.seed do |s|
   22     s.id = PostActionType.types[:inappropriate]
   23     s.name_key = "inappropriate"
   24     s.is_flag = true
   25     s.position = 4
   26   end
   27 end
   28 
   29 if PostActionType.types[:spam]
   30   PostActionType.seed do |s|
   31     s.id = PostActionType.types[:spam]
   32     s.name_key = "spam"
   33     s.is_flag = true
   34     s.position = 6
   35   end
   36 end
   37 
   38 if PostActionType.types[:notify_user]
   39   PostActionType.seed do |s|
   40     s.id = PostActionType.types[:notify_user]
   41     s.name_key = "notify_user"
   42     s.is_flag = true
   43     s.position = 7
   44   end
   45 end
   46 
   47 if PostActionType.types[:notify_moderators]
   48   PostActionType.seed do |s|
   49     s.id = PostActionType.types[:notify_moderators]
   50     s.name_key = "notify_moderators"
   51     s.is_flag = true
   52     s.position = 8
   53   end
   54 end