<commit_before>class Admin::Store::AutoShipItemsController < Admin::BaseController
  
  def index
    @auto_ship_items = AutoShipItem.order(user_id: :asc, created_at: :desc).page(params[:page])
  end
  
  
  def new
    @auto_ship_item = AutoShipItem.new(next_ship_date: Date.today)
    render 'edit'
  end

  def create
    @auto_ship_item = AutoShipItem.new(auto_ship_item_params)
    
    if @auto_ship_item.save
      redirect_to action: 'index', notice: 'AutoShipItem was successfully created.'
    else
      render 'edit'
    end
  end

  def edit
    @auto_ship_item = AutoShipItem.find(params[:id])
  end

  def update
    @auto_ship_item = AutoShipItem.find(params[:id])
    
    if @auto_ship_item.update(auto_ship_item_params)
      redirect_to action: 'index', notice: 'AutoShipItem was successfully updated.'
    else
      render 'edit'
    end<commit_msg>auto ship order<commit_after>class Admin::Store::AutoShipItemsController < Admin::BaseController
  
  def index
    @auto_ship_items = AutoShipItem.order(:next_ship_date).page(params[:page])
  end
  
  
  def new
    @auto_ship_item = AutoShipItem.new(next_ship_date: Date.today)
    render 'edit'
  end

  def create
    @auto_ship_item = AutoShipItem.new(auto_ship_item_params)
    
    if @auto_ship_item.save
      redirect_to action: 'index', notice: 'AutoShipItem was successfully created.'
    else
      render 'edit'
    end
  end

  def edit
    @auto_ship_item = AutoShipItem.find(params[:id])
  end

  def update
    @auto_ship_item = AutoShipItem.find(params[:id])
    
    if @auto_ship_item.update(auto_ship_item_params)
      redirect_to action: 'index', notice: 'AutoShipItem was successfully updated.'
    else
      render 'edit'
    end
{'fraction_non_alphanumeric': 0.09264620729588882, 'fraction_numerical': 0.0, 'mean_word_length': 3.5714285714285716, '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': '3629662', 'n_tokens_mistral': 575, 'n_tokens_neox': 582, 'n_words': 120}