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 resource

Source | Google | Stack overflow

Edit

git clone [email protected]:magiclabs/alchemy_cms.git

cd alchemy_cms

open lib/alchemy/resources_helper.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Alchemy--ResourcesHelper-render_resources-for-pr


# Commit to git

git add lib/alchemy/resources_helper.rbgit commit -m "better docs for Alchemy::ResourcesHelper#render_resources"


# Open pull request

gem 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!