diff --git a/.gitignore b/.gitignore index dc5b575..c603711 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ coverage/* .tool-versions spec/gemfiles/*.lock +.byebug_history diff --git a/spec/gemfiles/Gemfile.rails-7.0 b/spec/gemfiles/Gemfile.rails-7.0 new file mode 100644 index 0000000..9a8f6e0 --- /dev/null +++ b/spec/gemfiles/Gemfile.rails-7.0 @@ -0,0 +1,14 @@ +source "http://rubygems.org" + +gemspec path: '../../' + +gem 'rails', "~> 7.0.0" +gem 'responders', '~> 3.0' +gem 'sqlite3' +gem 'sprockets', '~> 3.0' +gem "jquery-rails" +gem "thin" +gem 'capybara', '~> 2.1' +gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git' + +gem 'byebug' diff --git a/spec/rails_app/app/controllers/users_controller.rb b/spec/rails_app/app/controllers/users_controller.rb index 96cf4ac..943f646 100644 --- a/spec/rails_app/app/controllers/users_controller.rb +++ b/spec/rails_app/app/controllers/users_controller.rb @@ -19,7 +19,11 @@ def index def show @user = User.find(params[:id]) respond_with(@user) do |format| - format.xlsx { render "respond_with.xlsx.axlsx" } + if Gem::Version.new("7.0") <= Rails.gem_version + format.xlsx { render "respond_with" } + else + format.xlsx { render "respond_with.xlsx.axlsx" } + end end end