Skip to content

Bug in lib/generators/cas_session_store_migration_generator.rb #97

@gbleydon

Description

@gbleydon

Rails 7.1+

In /lib/generators/cas_session_store_migration_generator.rb you have:

if ActiveRecord::Base.timestamped_migrations
  ....
else
 ....
end

Should be

if ActiveRecord.timetamped_migrations
  ...
else
 ....
end

Without that change when you run the migration you get method missing error

bin/rails generate cas_session_store_migration
/home/vscode/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activerecord-7.2.1/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `timestamped_migrations' for class ActiveRecord::Base (NoMethodError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions