Sha256: e4f5d81a13820840d2b362cee976e4ad3170f86f3a08a3f7ccb14b97934acf1b

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

module ReleaseNotes
  module Generators
    module OrmHelpers
      def model_contents
        buffer = <<-CONTENT
  validates :version, presence: true,
                      uniqueness: true
CONTENT
        buffer
      end

      private

        def model_exists?
          File.exists?(File.join(destination_root, model_path))
        end
        
        def migration_path
          @migration_path ||= File.join("db", "migrate")
        end

        def model_path
          @model_path ||= File.join("app", "models", "#{file_path}.rb")
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
release_notes-0.1.3 lib/generators/release_notes/orm_helpers.rb