Fixes for the review made by @javierm

this commit will be merged with the others when the chages
are accepted
This commit is contained in:
Raúl Fuentes
2018-08-24 15:11:54 +02:00
committed by Javi Martín
parent 88f0f14eab
commit d574657b77
10 changed files with 28 additions and 25 deletions

View File

@@ -27,8 +27,16 @@ class ApplicationController < ActionController::Base
respond_to :html
helper_method :current_budget
before_action :set_user_for_ckeditor_pictures
private
def set_user_for_ckeditor_pictures
if request.path == '/ckeditor/pictures' && request.request_method == 'POST'
params['user_id'] = current_user.id
end
end
def authenticate_http_basic
authenticate_or_request_with_http_basic do |username, password|
username == Rails.application.secrets.http_basic_username && password == Rails.application.secrets.http_basic_password