Refactoring controllers (#546)

* include byebug in test group

* refactor feeds controller

* refactor tags and maps controllers

* refactor images controller

* increase maps controller test coverage
This commit is contained in:
Cess
2019-04-23 19:32:25 +03:00
committed by Jeffrey Warren
parent ef48de5544
commit 253ab8b2f0
10 changed files with 113 additions and 67 deletions

View File

@@ -41,4 +41,11 @@ class ApplicationController < ActionController::Base
return false
end
end
def save_tags(map)
return unless params[:tags].present?
params[:tags].tr(' ', ',').split(',').each do |tagname|
map.add_tag(tagname.strip, current_user)
end
end
end