mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Put RailsVersion into autoloaded path
Also configure it for the next rails version
This commit is contained in:
parent
4ec9aee5da
commit
04beb397ee
1 changed files with 2 additions and 2 deletions
14
app/lib/rails_version.rb
Normal file
14
app/lib/rails_version.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Check which Rails version is used by the application
|
||||
#
|
||||
# This allows code to be migrated to a newer version of Rails while keeping the old code around
|
||||
# until the migration to the newer Rails version is done.
|
||||
#
|
||||
# Use this module in combination with the gem next_rails and its Gemfile.next/Gemfile.next.lock.
|
||||
#
|
||||
# Methods of this module must match whatever Rails version is defined in Gemfile.next.lock.
|
||||
# Matching on major and minor versions should be enough for most migrations.
|
||||
module RailsVersion
|
||||
def self.next?
|
||||
Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR == 2
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue