aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-29 17:34:00 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-02-19 20:42:44 +0000
commit06b8a48093a0ce395ea6824e6b00afec444447c3 (patch)
tree2532596a2bdb3f497c689c126634bb7374c22a1b /perllib/FixMyStreet/DB
parentb2cebf6393a1fb3d1724a49240f80873fa5d744b (diff)
Helper function for fetching database secret.
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Secret.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Secret.pm b/perllib/FixMyStreet/DB/ResultSet/Secret.pm
new file mode 100644
index 000000000..971584b9a
--- /dev/null
+++ b/perllib/FixMyStreet/DB/ResultSet/Secret.pm
@@ -0,0 +1,12 @@
+package FixMyStreet::DB::ResultSet::Secret;
+use base 'DBIx::Class::ResultSet';
+
+use strict;
+use warnings;
+
+sub get {
+ my $rs = shift;
+ return $rs->first->secret;
+}
+
+1;