Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
estiens committed Nov 19, 2022
1 parent 4777978 commit 02412b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/views/matches/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
json.array! @matches, partial: 'matches/match', as: :match, cached: ->(match) { [match, @details] }
json.array! @matches, partial: 'matches/match', as: :match

# , cached: ->(match) { [match, @details] }
7 changes: 7 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ class Application < Rails::Application
config.load_defaults 7.0
config.time_zone = 'UTC'
config.active_job.queue_adapter = :good_job

config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', :headers => :any, :methods => %i[get options]
end
end
end
end
2 changes: 0 additions & 2 deletions config/initializers/requires.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
require Rails.root.join('lib/2022/setup.rb')
require Rails.root.join('scrapers/json_match.rb')

Oj.optimize_rails

0 comments on commit 02412b4

Please sign in to comment.