Hi there!
I’m trying to add a Smart Segment in Forest. I’m using Rails 6.1.4.1 with Forest Liana 7.6.7
I added a folder in /lib called forest_liana then a folder collections and created a file shares_purchase.rb (name of one of my models).
I then used the code on Smart Segments - Developer guide ad model to create a Smart Segment :
class Forest::SharesPurchase
include ForestLiana::Collection
collection :SharesPurchase
segment "Potential duplicates" do
duplicates_id = SharesPurchase.where(amount: 1)
{ id: duplicates_id }
end
end
The Smart Segment doesn’t appear in Forest UI (even as a hidden collection).
Can you please tell me what I am doing wrong? Thanks!
Context
- Project name: Time for the Planet
- Team name: Operation
- Environment name: Development
- Agent type & version: Forest Liana