Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Fix for migration file extension #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MigrationGenerator < ActiveRecord::Generators::Base
argument :name, :type => :string, :default => 'create_vestal_versions'

def generate_files
migration_template 'migration.rb', "db/migrate/#{name}"
migration_template 'migration.rb', "db/migrate/#{name}.rb"
template 'initializer.rb', 'config/initializers/vestal_versions.rb'
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/vestal_versions/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Users

included do
attr_accessor :updated_by
Version.class_eval{ include VersionMethods }
Version.class_eval{ include UserVersionMethods }
end

# Methods added to versioned ActiveRecord::Base instances to enable versioning with additional
Expand All @@ -22,7 +22,7 @@ def version_attributes
end

# Instance methods added to VestalVersions::Version to accomodate incoming user information.
module VersionMethods
module UserVersionMethods
extend ActiveSupport::Concern

included do
Expand Down
4 changes: 2 additions & 2 deletions lib/vestal_versions/version_tagging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def tag_version(tag)
end

# Instance methods included into VestalVersions::Version to enable version tagging.
module VersionMethods
module TaggingVersionMethods
extend ActiveSupport::Concern

included do
Expand All @@ -46,6 +46,6 @@ def validate_tags?
tagged? && tag != 'deleted'
end

Version.class_eval{ include VersionMethods }
Version.class_eval{ include TaggingVersionMethods }
end
end