Added feature to add content block to headings in sidebar -- rebase
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user