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
{{ message }}
This repository was archived by the owner on May 21, 2021. It is now read-only.
If you like it or continue to use it fork it please.
RailsAdminLiveEdit
A rails_admin plugin to edit site contents from the frontend.
If the user is logged in rails_admin a fixed bar on bottom is shown. It allows to edit (or delete) the current record (if in a show page) or to create a new one.
Add to application layout (in body) (erb example): <%= render 'live_edit/ra_live_editor' %>
[Optional] Instead of letting the model name being guest from the controller name that rendered the view you can render the live_editor partial passing the target_model and/or the target_model_id like this: <%= render partial: 'live_edit/ra_live_editor', locals: { target_model: 'post', target_model_id: 42 } %>
Edit or create app/assets/javascripts/rails_admin/custom/ui.js and add: //= require rails_admin/plugins/live_edit/ui.js
Notes
This plugin use current_user method to check if the user is logged in; to bypass this check it is possible to define a current_user helper method.