summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-10-02 18:57:13 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-10-02 19:00:41 -0400
commit5e3be9cda0e23e2c62a3e3b08791357ce572d998 (patch)
tree3366e026075f8f783087b0668fb59cd2a5c36bd0 /app/models/commit.rb
parent38ca52f33b6a6824268f3dc92cf5ca13ad737c20 (diff)
downloadgitlab-ce-5e3be9cda0e23e2c62a3e3b08791357ce572d998.tar.gz
Cache the value of safe_message
Also, just for extra paranoia, only call safe_message once in the decorator methods Adds specs to make sure it still works
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index aba21762126..a070e830680 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -107,7 +107,7 @@ class Commit
end
def safe_message
- utf8 message
+ @safe_message ||= utf8 message
end
def created_at