Skip to content

Commit

Permalink
changed recipe view javascript code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Sloughter committed Jan 17, 2009
1 parent d5f6227 commit 1f3d157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/recipe_utils.erl
Expand Up @@ -57,5 +57,5 @@ create_json ({Type, List}) ->
{list_to_binary(Type), [[list_to_binary(hd(wf:q(X))) || X <- L] || L <- List]}.

create_user_recipe_view (Username) ->
couchdb_utils:view_create (?COUCHDB_RECIPES_DB_NAME, Username, <<"javascript">>, [{all, list_to_binary("function(doc)\n{\n if (doc.username == \"" ++ Username ++ "\")\n {\n emit(null, doc); \n }\n}")}], []).
couchdb_utils:view_create (?COUCHDB_RECIPES_DB_NAME, Username, <<"javascript">>, [{all, list_to_binary("function(doc)\n{\n if (doc.username == \"" ++ Username ++ "\")\n {\n emit(null, {\"id\": doc._id, \"name\":doc.name}); \n }\n}")}], []).

0 comments on commit 1f3d157

Please sign in to comment.