夜帝
unread,Feb 11, 2012, 10:33:44 PM2/11/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to chica...@googlegroups.com
I see in cb_admin,there are two same functions in a controller,as follows:
delete('GET', [App, Lang], Auth) ->
{ok, [{lang_section, true}, {this_application, App}, {applications, boss_web:get_all_applications()},
{this_lang, Lang}]};
delete('POST', [App, Lang], Auth) ->
AppAtom = list_to_atom(App),
boss_lang:delete_lang(AppAtom, Lang),
boss_web:reload_translation(Lang),
{redirect, [{action, "show"}]}.
But in my project,I create two functions like this in my controller:
delete('GET', [])->
……
ok.
delete('POST', [])->
……
……
ok.
[root@Libra busmeet]# ./rebar compile
==> busmeet (pre_compile)
ERROR: pre_compile failed while processing /root/Erlang/busmeet: {'EXIT',{{badmatch,{error,[{"/root/Erlang/busmeet/src/controller/busmeet_main_controller.erl",
[{{17,1},
erl_lint,
{redefine_function,{delete,2}}}]}]}},
[{boss_load,load_all_modules,3},
{boss_load,load_all_modules_and_emit_app_file,2},
{boss_rebar,compile,4},
{boss_plugin,pre_compile,2},
{rebar_core,run_modules,4},
{rebar_core,execute,4},
{rebar_core,process_dir0,6},
{rebar_core,process_commands,2}]}}