- Update pg_hba.conf (most likely in /etc/postgresql/9.4/main) with -
host all all 0.0.0.0/0 trust
- Update postgresql.conf to use
listen_addresses = '*' - Be sure to
sudo service postgresql restart
Configure Vagrant
| module PaginateHelper | |
| class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
| protected | |
| def html_container(html) | |
| tag(:nav, tag(:ul, html, class: "pagination")) | |
| end | |
| def previous_or_next_page(page, text, classname) | |
| if page |
| require 'benchmark/ips' | |
| class Foo | |
| def bar; end | |
| end | |
| foo = Foo.new | |
| Benchmark.ips do |x| | |
| x.config(:time => 5, :warmup => 2) |
belongs_to association does not automatically save the object. It does not save the associated object either.has_one association, that object is automatically saved (in order to update its foreign key).has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.