Design architecture to handle links on view side?
In application, we have lots of if conditions on view side. Like which link should appear to specific user and which link should not.
I want to create a architecture which shows specific link to specific user but without writing any if condition on view side.
I am thinking to store all the links into the database and on the basis of roles links directly will come on view.
Looking for better ways to handle this scenario or better solution to solve out this problem.
What database design should 开发者_C百科be to handle this type of scenario ? How to design a architecture to handle it ?
Unless I missed something you're describing the role of helpers
in Rails: extracting logic from views.
精彩评论