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
| h1 Hello, World! Hello #{name}! | |
| / I initially had only `.render({}, locals)`, which meant that the partials didn't | |
| / have access to any helper methods contained inside `OtherHelperMethods` (but `home.slim` did). | |
| / Passing `self` into `.render`, as the first argument, fixes that (if you're curious | |
| / about that, look up the `Tilt::Template #render` documentation. | |
| / With this PartialsHelper, passing locals is optional, as is specifying a different | |
| / path to the partial (relative to `settings.views`). |
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
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |