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
2 changed files with 4 additions and 2 deletions
|
@ -19,11 +19,13 @@ class ApplicationController < ActionController::Base
|
|||
Wiki.new
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def xhtml_enabled?
|
||||
in_a_web? and [:markdownMML, :markdownPNG, :markdown].include?(@web.markup)
|
||||
end
|
||||
|
||||
protected
|
||||
helper_method :xhtml_enabled?
|
||||
|
||||
def check_authorization
|
||||
if in_a_web? and authorization_needed? and not authorized?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue