Make xhtml_enabled? a Protected Method
... as it should be. Remarkably, it's still possible to use it in views, if you declare it a helper method.
This commit is contained in:
parent
d3e79ea84a
commit
f3b69bc57b
|
@ -19,11 +19,13 @@ class ApplicationController < ActionController::Base
|
||||||
Wiki.new
|
Wiki.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
def xhtml_enabled?
|
def xhtml_enabled?
|
||||||
in_a_web? and [:markdownMML, :markdownPNG, :markdown].include?(@web.markup)
|
in_a_web? and [:markdownMML, :markdownPNG, :markdown].include?(@web.markup)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
helper_method :xhtml_enabled?
|
||||||
|
|
||||||
def check_authorization
|
def check_authorization
|
||||||
if in_a_web? and authorization_needed? and not authorized?
|
if in_a_web? and authorization_needed? and not authorized?
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<div id="Container">
|
<div id="Container">
|
||||||
<div id="Content">
|
<div id="Content">
|
||||||
<h1 id="pageName">
|
<h1 id="pageName">
|
||||||
<%= render(:file => 'svg_logo') if @controller.xhtml_enabled? %>
|
<%= render(:file => 'svg_logo') if xhtml_enabled? %>
|
||||||
<%- if @page and (@page.name == 'HomePage') and %w( show published print ).include?(@action_name) -%>
|
<%- if @page and (@page.name == 'HomePage') and %w( show published print ).include?(@action_name) -%>
|
||||||
<%= h(@web.name) + (@show_diff ? ' (changes)' : '') %>
|
<%= h(@web.name) + (@show_diff ? ' (changes)' : '') %>
|
||||||
<%- elsif @web -%>
|
<%- elsif @web -%>
|
||||||
|
|
Loading…
Reference in a new issue