Added feature to add content block to headings in sidebar -- rebase

This commit is contained in:
Milber Champutiz Burbano
2018-11-27 09:37:35 -05:00
parent e23fbc8d58
commit 9f455b9165
25 changed files with 289 additions and 48 deletions

View File

@@ -17,6 +17,7 @@ module Budgets
before_action :load_categories, only: [:index, :new, :create]
before_action :set_default_budget_filter, only: :index
before_action :set_view, only: :index
before_action :load_content_blocks, only: :index
skip_authorization_check only: :json_data
@@ -149,6 +150,10 @@ module Budgets
@categories = ActsAsTaggableOn::Tag.category.order(:name)
end
def load_content_blocks
@heading_content_blocks = @heading.content_blocks.where(locale: I18n.locale) if @heading
end
def tag_cloud
TagCloud.new(Budget::Investment, params[:search])
end