Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Jan 4, 2025
1 parent e2acbb4 commit 6cee96c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/models/location_description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
class LocationDescription < Description
require "acts_as_versioned"

# enum definitions for use by simple_enum gem
# Do not change the integer associated with a value
enum :source_type,
{ public: 1, foreign: 2, project: 3, source: 4, user: 5 },
Expand Down
1 change: 0 additions & 1 deletion app/models/name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ class Name < AbstractModel
extend Parse
extend Create

# enum definitions for use by simple_enum gem
# Do not change the integer associated with a value
enum :rank, {
Form: 1,
Expand Down
1 change: 0 additions & 1 deletion app/models/name_description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
class NameDescription < Description
require "acts_as_versioned"

# enum definitions for use by simple_enum gem
# Do not change the integer associated with a value
enum :review_status, { unreviewed: 1, unvetted: 2, vetted: 3, inaccurate: 4 }

Expand Down
15 changes: 7 additions & 8 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,27 +199,26 @@
class User < AbstractModel # rubocop:disable Metrics/ClassLength
require "digest/sha1"

# enum definitions for use by simple_enum gem
# Do not change the integer associated with a value
# first value is the default
# First value is the default
enum :thumbnail_size, { thumbnail: 1, small: 2 },
prefix: :thumb_size, default: "thumbnail", instance_methods: false
prefix: :thumb_size, default: :thumbnail, instance_methods: false

enum :image_size,
{ thumbnail: 1, small: 2, medium: 3, large: 4, huge: 5, full_size: 6 },
prefix: true, default: "medium", instance_methods: false
prefix: true, default: :medium, instance_methods: false

enum :votes_anonymous, { no: 1, yes: 2, old: 3 },
prefix: :votes_anon, default: "no", instance_methods: false
prefix: :votes_anon, default: :no, instance_methods: false

enum :location_format, { postal: 1, scientific: 2 },
prefix: true, default: "postal", instance_methods: false
prefix: true, default: :postal, instance_methods: false

enum :hide_authors, { none: 1, above_species: 2 },
prefix: true, default: "none", instance_methods: false
prefix: true, default: :none, instance_methods: false

enum :keep_filenames, { toss: 1, keep_but_hide: 2, keep_and_show: 3 },
suffix: :filenames, default: "toss", instance_methods: false
suffix: :filenames, default: :toss, instance_methods: false

has_one :user_stats, dependent: :destroy

Expand Down

0 comments on commit 6cee96c

Please sign in to comment.