ruby-on-railsalchemy-cms

Alchemy CMS - new module not showing in the left sidebar


I have followed this guide to generate a new module called Users. I have updated the icon to be:

config/initializers/alchemy_user.rb

image: 'alchemy/users_module.png'

I have placed the image to app/assets/images/alchemy/users_module.rb

But the icon does not show in the left sidebar. I can navigate to /admin/users by typing the adres manually in the address bar.

What am I missing?

I have other modules for other models in my app, i.e. hospitals, doctors, etc. and they do appear in the left sidebar with icons.

What do I need to do in order for the new module to appear in the left sidebar?


Solution

  • With the help of the guys from Alchemy CMS on their Slack channel I was able to resolve this.

    I had a typoo in alchemy_user.rb and was missing a rule in UserAbility.

    alchemy_user.rb

    Instead

    Alchemy::Modules.register_module({
        controller: '/admin/user',
        ...
    })
    

    it should be

    controller: '/admin/users' # plural
    

    And in user_ability.rb

    can :manage, :admin_users