diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-08 03:27:56 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-08 03:27:56 -0500 |
commit | 623292eb16593a02e11786116ab6efd5a14047fe (patch) | |
tree | 1fa00d849c6fe304c93bcb1afdeb19ca56e7429e /src/guff/site-model.cr | |
parent | 4a5da91ee4df8b6ca886e4c2433fb04bc6499041 (diff) | |
download | old-guff-623292eb16593a02e11786116ab6efd5a14047fe.tar.bz2 old-guff-623292eb16593a02e11786116ab6efd5a14047fe.zip |
lots of fixes
Diffstat (limited to 'src/guff/site-model.cr')
-rw-r--r-- | src/guff/site-model.cr | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/guff/site-model.cr b/src/guff/site-model.cr index ecde831..9c8899a 100644 --- a/src/guff/site-model.cr +++ b/src/guff/site-model.cr @@ -13,11 +13,13 @@ module Guff super(models, SQL) end - def get_default - one(:get_default, nil, {} of String => String) + def get_default : Int + r = one(:get_default, nil, {} of String => String) + raise "no default site" unless r + r.to_i end - def to_site(host : String?) + def to_site(host : String?) : Int # TODO get_default end |