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 eaab209 commit 8d5f1a9Copy full SHA for 8d5f1a9
lib/generators/superform/install/install_generator.rb
@@ -4,6 +4,8 @@ class Superform::InstallGenerator < Rails::Generators::Base
4
APPLICATION_CONFIGURATION_PATH = Rails.root.join("config/application.rb")
5
6
def install_phlex_rails
7
+ return if gem_in_bundle? "phlex-rails"
8
+
9
gem "phlex-rails"
10
generate "phlex:install"
11
end
@@ -21,4 +23,9 @@ def autoload_components
21
23
def create_application_form
22
24
template "application_form.rb", Rails.root.join("app/views/forms/application_form.rb")
25
26
27
+ private
28
+ def gem_in_bundle?(gem_name)
29
+ Bundler.load.specs.any? { |spec| spec.name == gem_name }
30
+ end
31
0 commit comments