rails_admin_content_builder
rails_admin_content_builder copied to clipboard
Link form the model
The link to the news should be modified as the user's needs. Today the link is fixed by the name of 'noticias', but it could be anything, 'Blog', "Texts". We should have a way so that the route could follow the name defined in the model. Example:
If model is Blog
element += '<a href="/blog/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';
if model is Text
element += '<a href="/texts/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';
of course, all dynamically without changing the name manually https://github.com/luizpicolo/rails_admin_content_builder/blob/master/app/assets/javascripts/rails_admin/content_builder.js.erb#L468
I'll try, if you don't mind
Hey my friend @dimanazarchuk, go ahead 👍