This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration_version variable to migration generator for rails 5 com…
…patibility (#2470) * Add migration_version variable to migration generator for rails 5 compatibility * Update syntax to satisfy hound
- Loading branch information
1 parent
76575c9
commit c0cf4b6
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c0cf4b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seems to work, I am on Rails 5.1 and created a migration for user to add avatar, it still created
class AddAttachmentAvatarToUsers < ActiveRecord::Migration
No rails version injected
In my project rails console showed these results for
Rails.version => 5.1.5
Rails.version.start_with? "5"
=>true
though
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
This printed exact output as expected like
"[5.1]"