Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
This commit is contained in:
@@ -2,7 +2,7 @@ require_dependency 'html_to_markdown'
|
||||
|
||||
class ComposerController < ApplicationController
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in
|
||||
requires_login
|
||||
|
||||
def parse_html
|
||||
markdown_text = HtmlToMarkdown.new(params[:html]).to_markdown
|
||||
|
||||
Reference in New Issue
Block a user