This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module JSHelpers | |
module JQueryUI | |
# type inside an autocomplete field and pick a value. | |
# | |
# @param [String] field selector of the autocomplete field | |
# @param [Hash] options details about what to search and what to select | |
# @param options [String] :with the text to type in the autocomplete field | |
# @param options [String] :select the text value of the autocomplete resuilt you | |
# want to pick. If this option is not present, the first result will be picked. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysql db backup and restore for rails | |
# by David Lowenfels <[email protected]> 4/2011 | |
require 'yaml' | |
namespace :db do | |
def backup_prep | |
@directory = File.join(RAILS_ROOT, 'db', 'backup') | |
@db = YAML::load( File.open( File.join(RAILS_ROOT, 'config', 'database.yml') ) )[ RAILS_ENV ] | |
@db_params = "-u #{@db['username']} #{@db['database']}" |
OlderNewer