Details

    • Sub-task
    • Resolution: Done
    • Minor
    • None
    • None
    • System
    • None

    Description

      1. Create UserDecorator and add these methods: full_name, display_name, informal_name. They must have the same behaviour that they had in the User model before this issue/task. Add tests.
      2. Remove those methods from the model. Remove the tests accordingly.
      3. Create AccountDecorator that returns the display_name of its admin_user. The method must be called admin_user_display_name. When admin_user is nil, this method must return nil. Add tests.
      4. Change all calls in the code to retrieve full_name, display_name, informal_name or the display_name of the admin_user to use the decorators.

      Dev Notes

      For this PR, the .decorate is done inside the views and helpers. To be refactored in next PRs/issues to be done from the controllers.
      But in this issue, it is already clean for mailers, CSV exporter and Analytics UserTracking.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mnoyabon Marta Noya (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: