You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case only a particular instance of a certain Model is to be shown in an admin view, you can use an instance block to identify the instance which is to be displayed.
For example if /admin/profile should link to the current_user instance of the User model do the following (observe that everything is the same except instance instead of collection is used):
Trestle.resource(:profile,singular: true,model: User)doinstance{current_user}# To have a singleton model, use: User.first_or_createmenudoitem:profile,icon: "fa fa-star"endformdo |user|
text_field:nametext_field:emailendend