Skip to content

Instantly share code, notes, and snippets.

@kblake
Created January 16, 2012 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kblake/c33b3328dc78094d4b2a to your computer and use it in GitHub Desktop.
Save kblake/c33b3328dc78094d4b2a to your computer and use it in GitHub Desktop.
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