Active Admin: two pages for one model

My User model can create either an Employer or a Jobseeker , depending on whether the Boolean attribute of Employer true or not.

What I want to do is separate pages for Employer and Jobseeker , not just separate areas. The pages will have completely different tables.

Many thanks!

+5
source share
1 answer

You can simply register your model twice, but name it differently each time.

 ActiveAdmin.register User, as: 'Employer' do # ... end ActiveAdmin.register User, as: 'Jobseeker' do # ... end 
+4
source

Source: https://habr.com/ru/post/1213461/


All Articles