class ActionBlocks::BarchartBuilder
Public Instance Methods
before_build(parent, *args)
click to toggle source
# File lib/action_blocks/builders/barchart_builder.rb, line 11 def before_build(parent, *args) @id = "#{parent.id}_#{args.first}" @title = id.to_s.titleize @calculate = :count end
hashify(user)
click to toggle source
# File lib/action_blocks/builders/barchart_builder.rb, line 17 def hashify(user) { title: @title, key: key, type: type, group: @group.try(:hashify, user), subgroup: @subgroup.try(:hashify, user) } end