alchemy_cms
https://github.com/magiclabs/alchemy_cms
Ruby
AlchemyCMS is a powerful, flexible and user centric Rails 5 CMS. 🧙🏻♂️
Alchemy::ResourcesHelper#render_resources
Renders the row for a resource record in the resources table.
This helper has a nice fallback. If you create a partial for your record then this partial will be rendered.
Otherwise the default +app/views/alchemy/admin/resources/_resource.html.erb+ partial gets rendered.
== Example
For a resource named +Comment+ you can create a partial named +_comment.html.erb+
# app/views/admin/comments/_comment.html.erb
<tr>
<td><%= comment.title %></td>
<td><%= comment.body %></td>
</tr>
NOTE: Alchemy gives you a local variable named like your resourceEdit
git clone [email protected]:magiclabs/alchemy_cms.git
cd alchemy_cms
open lib/alchemy/resources_helper.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Alchemy--ResourcesHelper-render_resources-for-pr
# Commit to gitgit add lib/alchemy/resources_helper.rbgit commit -m "better docs for Alchemy::ResourcesHelper#render_resources"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Alchemy--ResourcesHelper-render_resources-for-pr
hub pull-request
# Celebrate!