performance tweaks for rails 4.1

This commit is contained in:
r888888888
2014-04-24 22:18:14 -07:00
parent a89c57cee0
commit aab03422bc
16 changed files with 22 additions and 16 deletions

View File

@@ -14,7 +14,7 @@ class WikiPagePresenter
end
def consequent_tag_aliases
@consequent_tag_aliases ||= TagAlias.where("status = 'active' and consequent_name = ?", wiki_page.title).all
@consequent_tag_aliases ||= TagAlias.where("status = 'active' and consequent_name = ?", wiki_page.title)
end
def antecedent_tag_alias
@@ -22,11 +22,11 @@ class WikiPagePresenter
end
def consequent_tag_implications
@consequent_tag_implications ||= TagImplication.where("status = 'active' and consequent_name = ?", wiki_page.title).all
@consequent_tag_implications ||= TagImplication.where("status = 'active' and consequent_name = ?", wiki_page.title)
end
def antecedent_tag_implications
@antecedent_tag_implications ||= TagImplication.where("status = 'active' and antecedent_name = ?", wiki_page.title).all
@antecedent_tag_implications ||= TagImplication.where("status = 'active' and antecedent_name = ?", wiki_page.title)
end
# Produce a formatted page that shows the difference between two versions of a page.