Sha256: 7b8f1429c19a2d1aad8cd779885909401679d4c5b4f1ddd2aad22893ee4c408e
Contents?: true
Size: 503 Bytes
Versions: 14
Compression:
Stored size: 503 Bytes
Contents
module AASM module Generators module OrmHelpers def model_contents if column_name == 'aasm_state' <<RUBY include AASM aasm do end RUBY else <<RUBY include AASM aasm :column => '#{column_name}' do end RUBY end end private def model_exists? File.exists?(File.join(destination_root, model_path)) end def model_path @model_path ||= File.join("app", "models", "#{file_path}.rb") end end end end
Version data entries
14 entries across 14 versions & 1 rubygems