Skip to content

Commit

Permalink
Move EncodedString spec model
Browse files Browse the repository at this point in the history
Debated removing this model entirely.
  • Loading branch information
ellnix committed Feb 29, 2024
1 parent a4c1d13 commit d00f686
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 0 additions & 11 deletions spec/support/active_record_classes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
t.boolean :premium
t.boolean :released
end
create_table :encoded_strings
end

class UniqUser < ActiveRecord::Base
Expand Down Expand Up @@ -69,13 +68,3 @@ def ms_dirty?
published_at < current_time
end
end

class EncodedString < ActiveRecord::Base
include MeiliSearch::Rails

meilisearch synchronous: true, force_utf8_encoding: true, index_uid: safe_index_uid('EncodedString') do
attribute :value do
"\xC2\xA0\xE2\x80\xA2\xC2\xA0".force_encoding('ascii-8bit')
end
end
end
12 changes: 12 additions & 0 deletions spec/support/models/specialty_models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
t.string :skip
end

ar_schema.create_table :encoded_strings

module Namespaced
def self.table_name_prefix
'namespaced_'
Expand Down Expand Up @@ -68,3 +70,13 @@ class SerializedDocument < ActiveRecord::Base
use_serializer SerializedDocumentSerializer
end
end

class EncodedString < ActiveRecord::Base
include MeiliSearch::Rails

meilisearch synchronous: true, force_utf8_encoding: true, index_uid: safe_index_uid('EncodedString') do
attribute :value do
"\xC2\xA0\xE2\x80\xA2\xC2\xA0".force_encoding('ascii-8bit')
end
end
end

0 comments on commit d00f686

Please sign in to comment.