Some cleanup
This commit is contained in:
parent
ff8ecd2773
commit
a172a28e6d
|
@ -14,11 +14,11 @@ plugin 'Config';
|
||||||
# Helpers
|
# Helpers
|
||||||
helper pg => sub {
|
helper pg => sub {
|
||||||
state $pg = Mojo::Pg->new(
|
state $pg = Mojo::Pg->new(
|
||||||
'postgres://' .
|
'postgres://' .
|
||||||
app->config->{'pg_user'} .
|
app->config->{'pg_user'} .
|
||||||
':' .
|
':' .
|
||||||
app->config->{'pg_pw'} .
|
app->config->{'pg_pw'} .
|
||||||
'@localhost/' .
|
'@localhost/' .
|
||||||
app->config->{'pg_db'}
|
app->config->{'pg_db'}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,9 +9,7 @@ use Mojo::Base -base, -signatures;
|
||||||
has 'pg';
|
has 'pg';
|
||||||
|
|
||||||
sub new($class, $pg, $object) {
|
sub new($class, $pg, $object) {
|
||||||
bless {
|
bless {$pg => $object}
|
||||||
$pg => $object
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_model($self, $string) {
|
sub test_model($self, $string) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user