Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7.1 Incompatibility: ActionView::Helpers::FormBuilder #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions meta_request/Dockerfile-rails-7.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM ruby:3.0-alpine

RUN apk add --update --no-cache \
build-base \
curl-dev \
git \
nodejs \
shared-mime-info \
sqlite-dev \
tzdata \
yaml-dev \
yarn \
zlib-dev

RUN mkdir /app /gem
WORKDIR /app

RUN gem update --system 3.5.7
RUN bundle config force_ruby_platform true
RUN gem install rails -v 7.1.3.2
RUN rails new .

COPY . /gem
RUN bundle add meta_request --path /gem
RUN bundle install

COPY res/routes.rb /app/config/
COPY res/dummy_controller.rb /app/app/controllers/
COPY res/dummy /app/app/views/dummy
COPY res/meta_request_test.rb /app/test/integration/

RUN bundle exec rails db:migrate

ENV PARALLEL_WORKERS 1

CMD ["bin/rake"]
8 changes: 5 additions & 3 deletions meta_request/lib/meta_request/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ def sanitize_hash(payload)
end

def not_encodable?(value)
(defined?(ActiveRecord) && value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)) ||
(defined?(ActionDispatch) &&
(value.is_a?(ActionDispatch::Request) || value.is_a?(ActionDispatch::Response)))
return true if defined?(ActiveRecord) && value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)
return true if defined?(ActionDispatch) && (value.is_a?(ActionDispatch::Request) || value.is_a?(ActionDispatch::Response))
return true if defined?(ActionView) && value.is_a?(ActionView::Helpers::FormBuilder)

false
end

# https://gist.github.com/dbenhur/1070399
Expand Down