-
-
Save kblake/c33b3328dc78094d4b2a to your computer and use it in GitHub Desktop.
Tweaks to Chicago Boss tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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