diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 5a73e5258..9f126a7ec 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -148,6 +148,7 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) + ffi (1.17.2-x86_64-darwin) ffi (1.17.2-x86_64-linux-gnu) fiber-annotation (0.2.0) fiber-local (1.1.0) @@ -224,6 +225,8 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) nokogiri (1.18.9-x86_64-linux-gnu) racc (~> 1.4) os (1.1.4) @@ -355,6 +358,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) + sqlite3 (2.7.3-x86_64-darwin) sqlite3 (2.7.3-x86_64-linux-gnu) stringio (3.1.7) thor (1.4.0) @@ -380,6 +384,7 @@ GEM zeitwerk (2.7.3) PLATFORMS + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -416,4 +421,4 @@ DEPENDENCIES webmock (~> 3.18) BUNDLED WITH - 2.6.9 + 2.5.5 diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 7582f3bc4..6c7d563f2 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -142,6 +142,7 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) + ffi (1.17.2-x86_64-darwin) ffi (1.17.2-x86_64-linux-gnu) fiber-annotation (0.2.0) fiber-local (1.1.0) @@ -217,6 +218,8 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) nokogiri (1.18.9-x86_64-linux-gnu) racc (~> 1.4) os (1.1.4) @@ -348,6 +351,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) + sqlite3 (2.7.3-x86_64-darwin) sqlite3 (2.7.3-x86_64-linux-gnu) stringio (3.1.7) thor (1.4.0) @@ -374,6 +378,7 @@ GEM zeitwerk (2.7.3) PLATFORMS + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -410,4 +415,4 @@ DEPENDENCIES webmock (~> 3.18) BUNDLED WITH - 2.6.9 + 2.5.5 diff --git a/gemfiles/rails_8.0.gemfile.lock b/gemfiles/rails_8.0.gemfile.lock index e047a147d..bd7863b8f 100644 --- a/gemfiles/rails_8.0.gemfile.lock +++ b/gemfiles/rails_8.0.gemfile.lock @@ -142,6 +142,7 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) + ffi (1.17.2-x86_64-darwin) ffi (1.17.2-x86_64-linux-gnu) fiber-annotation (0.2.0) fiber-local (1.1.0) @@ -217,6 +218,8 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) nokogiri (1.18.9-x86_64-linux-gnu) racc (~> 1.4) os (1.1.4) @@ -348,6 +351,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) + sqlite3 (2.7.3-x86_64-darwin) sqlite3 (2.7.3-x86_64-linux-gnu) stringio (3.1.7) thor (1.4.0) @@ -374,6 +378,7 @@ GEM zeitwerk (2.7.3) PLATFORMS + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -410,4 +415,4 @@ DEPENDENCIES webmock (~> 3.18) BUNDLED WITH - 2.6.9 + 2.5.5 diff --git a/lib/ruby_llm/active_record/chat_methods.rb b/lib/ruby_llm/active_record/chat_methods.rb index fed3c4afb..352a55c36 100644 --- a/lib/ruby_llm/active_record/chat_methods.rb +++ b/lib/ruby_llm/active_record/chat_methods.rb @@ -286,7 +286,9 @@ def prepare_for_active_storage(attachments) case attachment when ActionDispatch::Http::UploadedFile, ActiveStorage::Blob attachment - when ActiveStorage::Attached::One, ActiveStorage::Attached::Many + when ActiveStorage::Attached::One + attachment.blob + when ActiveStorage::Attached::Many attachment.blobs when Hash attachment.values.map { |v| prepare_for_active_storage(v) }