Class: Sequel::Generators::Base
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Sequel::Generators::Base
show all
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/rails/generators/sequel.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.source_root ⇒ Object
14
15
16
|
# File 'lib/rails/generators/sequel.rb', line 14
def self.source_root
@source_root ||= File.expand_path(File.join(base_name, generator_name, 'templates'), File.dirname(__FILE__))
end
|
Instance Method Details
#cpk ⇒ Object
18
19
20
21
22
|
# File 'lib/rails/generators/sequel.rb', line 18
def cpk
if @primary_keys and !@primary_keys.empty? then
"primary_key([#{@primary_keys.map {|pk| ':' + pk}.join(', ')}])"
end
end
|