rename get_distinct to get_distinct_col

This commit is contained in:
Oliver Gorwits
2012-08-27 21:34:54 +01:00
parent 74d82d86b0
commit 58764f04ca
2 changed files with 5 additions and 5 deletions

View File

@@ -388,7 +388,7 @@ sub get_releases {
}
=head2 get_distinct( $column )
=head2 get_distinct_col( $column )
Returns an asciibetical sorted list of the distinct values in the given column
of the Device table. This is useful for web forms when you want to provide a
@@ -396,7 +396,7 @@ drop-down list of possible options.
=cut
sub get_distinct {
sub get_distinct_col {
my ($rs, $col) = @_;
return $rs unless $col;

View File

@@ -235,13 +235,13 @@ get '/search' => sub {
# used in the device search sidebar to populate select inputs
var('model_list' => [
schema('netdisco')->resultset('Device')->get_distinct('model')
schema('netdisco')->resultset('Device')->get_distinct_col('model')
]);
var('os_ver_list' => [
schema('netdisco')->resultset('Device')->get_distinct('os_ver')
schema('netdisco')->resultset('Device')->get_distinct_col('os_ver')
]);
var('vendor_list' => [
schema('netdisco')->resultset('Device')->get_distinct('vendor')
schema('netdisco')->resultset('Device')->get_distinct_col('vendor')
]);
# list of tabs