Top Level Namespace

Defined Under Namespace

Modules: ApplicationHelper, RailPass, Utilities Classes: StaticController

Instance Method Summary collapse

Instance Method Details

#prepare_for_db_commandObject



137
138
139
140
141
142
# File 'lib/generators/templates/config/recipes/mysql.rb', line 137

def prepare_for_db_command
	# set :mysql_database, "#{application}_#{environment}"
	set(:db_admin_user) { Capistrano::CLI.ui.ask "Username with priviledged database access (to create db):" }
	# set(:mysql_user) { Capistrano::CLI.ui.ask "Enter #{environment} database username:" }
	# set(:mysql_password) { Capistrano::CLI.password_prompt "Enter #{environment} database password:" }
end

#set_default(name, *args, &block) ⇒ Object



6
7
8
# File 'lib/generators/templates/config/recipes/base.rb', line 6

def set_default(name, *args, &block)
	set(name, *args, &block) unless exists?(name)
end

#template(from, to) ⇒ Object



1
2
3
4
# File 'lib/generators/templates/config/recipes/base.rb', line 1

def template(from, to)
	erb = File.read(File.expand_path("../templates/#{from}", __FILE__))
	put ERB.new(erb).result(binding), to
end