<commit_before>require 'ipaddr'

module Ershou
  class Topic < ActiveRecord::Base

    attr_accessible :title, :content
    attr_accessible :price, :phone

    belongs_to :user
    belongs_to :node
    has_many :comments, :dependent => :destroy
    #has_many :attachments, :dependent => :destroy

    validates :title, :presence => true

    state_machine :initial => :open do
      event 'open' do
        transition all => :open
      end
      event 'close' do
        transition all => :closed
      end

    end<commit_msg>price and phone<commit_after>require 'ipaddr'

module Ershou
  class Topic < ActiveRecord::Base

    attr_accessible :title, :content
    attr_accessible :price, :phone

    belongs_to :user
    belongs_to :node
    has_many :comments, :dependent => :destroy
    #has_many :attachments, :dependent => :destroy

    validates :title, :presence => true
    validates :price, :presence => true
    validates :phone, :presence => true

    state_machine :initial => :open do
      event 'open' do
        transition all => :open
      end
      event 'close' do
        transition all => :closed
      end

    end
{'fraction_non_alphanumeric': 0.09314586994727592, 'fraction_numerical': 0.0, 'mean_word_length': 2.835016835016835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '5418004', 'n_tokens_mistral': 343, 'n_tokens_neox': 332, 'n_words': 105}