diff options
| author | Teddy Wing | 2017-06-19 15:39:34 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-19 15:39:34 +0200 |
| commit | 3a9dbe0db981536ea7c138915e423ac009235c60 (patch) | |
| tree | b2e6cad6860a36adaa51900f4d1ae9706296ab99 /app | |
| parent | 84ebcffb06d9ba9a56cc29d1739f1f950649f82e (diff) | |
| download | chouette-core-3a9dbe0db981536ea7c138915e423ac009235c60.tar.bz2 | |
Move Chouette:: decorators to root decorators/ directory
Draper doesn't seem to look for decorators in subdirectories of
decorators/, so instead of writing things like:
@line = Chouette::LineDecorator.decorate(@line)
in the controller, move the decorators to the root of decorators/ to
allow us to continue using this syntax:
@line = @line.decorate
Refs #3479
Diffstat (limited to 'app')
| -rw-r--r-- | app/decorators/company_decorator.rb | 1 | ||||
| -rw-r--r-- | app/decorators/line_decorator.rb (renamed from app/decorators/chouette/line_decorator.rb) | 4 | ||||
| -rw-r--r-- | app/decorators/routing_constraint_zone_decorator.rb (renamed from app/decorators/chouette/routing_constraint_zone_decorator.rb) | 4 | ||||
| -rw-r--r-- | app/decorators/time_table_decorator.rb (renamed from app/decorators/chouette/time_table_decorator.rb) | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/app/decorators/company_decorator.rb b/app/decorators/company_decorator.rb index 3bd85319c..4adc51cc2 100644 --- a/app/decorators/company_decorator.rb +++ b/app/decorators/company_decorator.rb @@ -1,4 +1,3 @@ -# TODO: Move this into the Chouette:: namespace class CompanyDecorator < Draper::Decorator decorates Chouette::Company diff --git a/app/decorators/chouette/line_decorator.rb b/app/decorators/line_decorator.rb index e32acb13b..84f6cba91 100644 --- a/app/decorators/chouette/line_decorator.rb +++ b/app/decorators/line_decorator.rb @@ -1,4 +1,6 @@ -class Chouette::LineDecorator < Draper::Decorator +class LineDecorator < Draper::Decorator + decorates Chouette::Line + delegate_all # Requires: diff --git a/app/decorators/chouette/routing_constraint_zone_decorator.rb b/app/decorators/routing_constraint_zone_decorator.rb index f95206064..4b5df20c1 100644 --- a/app/decorators/chouette/routing_constraint_zone_decorator.rb +++ b/app/decorators/routing_constraint_zone_decorator.rb @@ -1,4 +1,6 @@ -class Chouette::RoutingConstraintZoneDecorator < Draper::Decorator +class RoutingConstraintZoneDecorator < Draper::Decorator + decorates Chouette::RoutingConstraintZone + delegate_all # Requires: diff --git a/app/decorators/chouette/time_table_decorator.rb b/app/decorators/time_table_decorator.rb index 7f2dbf5f1..57661c627 100644 --- a/app/decorators/chouette/time_table_decorator.rb +++ b/app/decorators/time_table_decorator.rb @@ -1,4 +1,6 @@ -class Chouette::TimeTableDecorator < Draper::Decorator +class TimeTableDecorator < Draper::Decorator + decorates Chouette::TimeTable + delegate_all # Requires: |
