diff options
author | Rémy Coutable <remy@rymai.me> | 2017-01-20 18:13:14 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-24 10:24:47 +0100 |
commit | 0ac65b6cc31962c293782a1f3e8d6d41922569c8 (patch) | |
tree | 6cbaa48c51a434aabc98f6491ffec169f918ade8 /app/presenters/README.md | |
parent | b60de9c0fd90c310d2a4146f75b67f9f360cbd6c (diff) | |
download | gitlab-ce-0ac65b6cc31962c293782a1f3e8d6d41922569c8.tar.gz |
Don't override presentee methods for Gitlab::View::Presenter::Delegated
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/presenters/README.md')
-rw-r--r-- | app/presenters/README.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/presenters/README.md b/app/presenters/README.md index 3edd63451e7..a4d592b54d6 100644 --- a/app/presenters/README.md +++ b/app/presenters/README.md @@ -113,7 +113,7 @@ detects the presenter based on the presented subject's class. class Projects::LabelsController < Projects::ApplicationController def edit @label = Gitlab::View::Presenter::Factory - .new(@label, user: current_user) + .new(@label, current_user: current_user) .fabricate! end end @@ -132,7 +132,7 @@ and then in the controller: ```ruby class Projects::LabelsController < Projects::ApplicationController def edit - @label = @label.present(user: current_user) + @label = @label.present(current_user: current_user) end end ``` @@ -147,7 +147,7 @@ end You can also present the model in the view: ```ruby -- label = @label.present(current_user) +- label = @label.present(current_user: current_user) %div{ class: label.text_color } = render partial: label, label: label |