diff options
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Schema.pm | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 9a64d1608..db7777053 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -121,12 +121,19 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07035 @ 2017-02-13 15:11:11 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BOJANVwg3kR/1VjDq0LykA +use Moo; +use namespace::clean; + +with 'FixMyStreet::Roles::Translatable'; + sub url { my ( $self, $c, $args ) = @_; # XXX $areas_info was used here for Norway parent - needs body parents, I guess return $c->uri_for( '/reports/' . $c->cobrand->short_name( $self ), $args || {} ); } +around name => \&translate_around; + sub areas { my $self = shift; my %ids = map { $_->area_id => 1 } $self->body_areas->all; diff --git a/perllib/FixMyStreet/DB/Schema.pm b/perllib/FixMyStreet/DB/Schema.pm index 7833ee68c..45d731c33 100644 --- a/perllib/FixMyStreet/DB/Schema.pm +++ b/perllib/FixMyStreet/DB/Schema.pm @@ -18,8 +18,11 @@ __PACKAGE__->load_namespaces( # Created by DBIx::Class::Schema::Loader v0.07035 @ 2017-07-13 14:15:09 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UpH30RXb6SbCqRv2FPmpkg +use Moo; use FixMyStreet; __PACKAGE__->connection(FixMyStreet->dbic_connect_info); +has lang => ( is => 'rw' ); + 1; |