<commit_before># this is needed for now to make mass assignment security compatible with the translation of globalize3
Globalize::ActiveRecord::Translation.class_eval do
  attr_accessible :locale
end

class Illustration < ActiveRecord::Base
  
  attr_accessible :image, :name
  
  validates_presence_of :name
  
  translates :name
  
  mount_uploader :image, ImageUploader
  
  def to_param
    name ? "#{id}-#{name.to_url}" : id
  end

  scope :by_recent, :order => 'updated_at desc'
end<commit_msg>Added an alphabetical scope to illustration model.<commit_after># this is needed for now to make mass assignment security compatible with the translation of globalize3
Globalize::ActiveRecord::Translation.class_eval do
  attr_accessible :locale
end

class Illustration < ActiveRecord::Base

  attr_accessible :image, :name

  validates_presence_of :name

  translates :name

  mount_uploader :image, ImageUploader

  def to_param
    name ? "#{id}-#{name.to_url}" : id
  end

  scope :by_recent, :order => 'updated_at desc'
  scope :alphabetically, order('name')
end
{'fraction_non_alphanumeric': 0.07973733583489681, 'fraction_numerical': 0.001876172607879925, 'mean_word_length': 4.830601092896175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3070228', 'n_tokens_mistral': 333, 'n_tokens_neox': 317, 'n_words': 102}