File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -229,15 +229,18 @@ def self.gem_available?(name)
229229 end
230230
231231 # Checks if React on Rails Pro is installed and licensed.
232- # With startup validation enabled, if this returns true, it means:
233- # 1. The react_on_rails_pro gem is installed
234- # 2. The license is valid (or the app would have failed to start)
232+ # This method validates the license and will raise an exception if invalid.
235233 #
236234 # @return [Boolean] true if Pro is available with valid license
235+ # @raise [ReactOnRailsPro::Error] if license is invalid
237236 def self . react_on_rails_pro?
238237 return @react_on_rails_pro if defined? ( @react_on_rails_pro )
239238
240- @react_on_rails_pro = gem_available? ( "react_on_rails_pro" )
239+ @react_on_rails_pro = begin
240+ return false unless gem_available? ( "react_on_rails_pro" )
241+
242+ ReactOnRailsPro ::Utils . licence_valid?
243+ end
241244 end
242245
243246 # Return an empty string if React on Rails Pro is not installed
You can’t perform that action at this time.
0 commit comments