<commit_before>module Spree
  Shipment.class_eval do 
    has_many :packages
    has_one :master_package, :class_name => 'Spree::Package'
    
    accepts_nested_attributes_for :packages
    
    scope :picked, where(:state => 'picked')
    scope :packed, where(:state => 'packed')
    
    StateMachine::Machine.ignore_method_conflicts = true 
    state_machines.clear
    
    state_machine :initial => 'not_picked', :use_transactions => false do
      
      event :pick do 
        transition :from => 'not_picked' , :to => 'picked'
      end 
      
      event :pack do
        transition :from => 'picked', :to => 'packed'
      end
      
      event :pending do
        transition :from => 'packed', :to => 'pending'
      end<commit_msg>[Shipment] Add attr_accessible for state<commit_after>module Spree
  Shipment.class_eval do 
    has_many :packages
    has_one :master_package, :class_name => 'Spree::Package'
    
    accepts_nested_attributes_for :packages
    
    scope :picked, where(:state => 'picked')
    scope :packed, where(:state => 'packed')

    attr_accessible :state
    
    StateMachine::Machine.ignore_method_conflicts = true 
    state_machines.clear
    
    state_machine :initial => 'not_picked', :use_transactions => false do
      
      event :pick do 
        transition :from => 'not_picked' , :to => 'picked'
      end 
      
      event :pack do
        transition :from => 'picked', :to => 'packed'
      end
      
      event :pending do
        transition :from => 'packed', :to => 'pending'
      end
{'fraction_non_alphanumeric': 0.1091026468689477, 'fraction_numerical': 0.0, 'mean_word_length': 2.587962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '5661175', 'n_tokens_mistral': 480, 'n_tokens_neox': 468, 'n_words': 117}