Skip to content

Instantly share code, notes, and snippets.

@kblake kblake/cboss-tweaks.txt Secret
Created Jan 16, 2012

Embed
What would you like to do?
Tweaks to Chicago Boss tutorial
http://www.rambocoder.com/?p=17
-------------------------------------------------------------------
Right after you load pages in index you see this error
The requested template ("/Users/kblake/devprojects/example_wiki/src/view/pages/index.html") was not found.
Maybe offer that "it's ok we'll fix this later :)"
-------------------------------------------------------------------
Add [Req] parameter to the -module declaration:
-module(example_wiki_pages_controller, [Req]).
this was already added in a prior step
-------------------------------------------------------------------
index.html
have page title link to view page..
<li><a href="view/{{page.id}}">{{ page.page_title }}</a></li>
-------------------------------------------------------------------
%% @doc Fetch the existing wiki and show the edit page
edit('GET', [Id]) ->
ExistingWikiPage = boss_db:find(Id),
{ok, [{page, ExistingWikiPage}]};
should be a terminating .
-------------------------------------------------------------------
Getting error with two actions named 'edit'
renamed edit to update
and
update form in edit.html too
<form method="post" action="{% url action="update" %}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.