We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 234aaab commit 5ffd297Copy full SHA for 5ffd297
lib/inertia_rails/generators/helper.rb
@@ -4,8 +4,8 @@ module InertiaRails
4
module Generators
5
module Helper
6
class << self
7
- def guess_the_default_framework
8
- package = Rails.root.join('package.json').read
+ def guess_the_default_framework(package_json_path = Rails.root.join("package.json"))
+ package = File.read(package_json_path)
9
case package
10
when %r{@inertiajs/react}
11
'react'
0 commit comments