<commit_before>class Ezine::PagesController < ApplicationController
  include Cms::BaseFilter
  include Cms::PageFilter

  model Ezine::Page

  append_view_path "app/views/cms/pages"
  navi_view "ezine/main/navi"

  private
    def fix_params
      { cur_user: @cur_user, cur_site: @cur_site, cur_node: @cur_node }
    end

    def pre_params
      super.merge(state: 'closed')
    end

    def load_pages
      raise "403" unless @cur_node.allowed?(:read, @cur_user, site: @cur_site)

      @items = @model.site(@cur_site).node(@cur_node).
        allow(:read, @cur_user).
        search(params[:s]).
        order_by(updated: -1).
        page(params[:page]).per(50)
    end

    def load_members(model)
      @members = model.where(node_id: @cur_node.id).order_by(updated: -1)
      @members_email = @members.reduce("") {|a, e| a += e.email + "\n"}
    end
<commit_msg>Fix @members_email with state column<commit_after>class Ezine::PagesController < ApplicationController
  include Cms::BaseFilter
  include Cms::PageFilter

  model Ezine::Page

  append_view_path "app/views/cms/pages"
  navi_view "ezine/main/navi"

  private
    def fix_params
      { cur_user: @cur_user, cur_site: @cur_site, cur_node: @cur_node }
    end

    def pre_params
      super.merge(state: 'closed')
    end

    def load_pages
      raise "403" unless @cur_node.allowed?(:read, @cur_user, site: @cur_site)

      @items = @model.site(@cur_site).node(@cur_node).
        allow(:read, @cur_user).
        search(params[:s]).
        order_by(updated: -1).
        page(params[:page]).per(50)
    end

    def load_members(model)
      @members = model.where(state: true, node_id: @cur_node.id).order_by(updated: -1)
      @members_email = @members.reduce("") {|a, e| a += e.email + "\n"}
    end

{'fraction_non_alphanumeric': 0.13876404494382022, 'fraction_numerical': 0.007865168539325843, 'mean_word_length': 3.1905882352941175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5818811', 'n_tokens_mistral': 640, 'n_tokens_neox': 617, 'n_words': 126}