Oh! That was it! Now I feel stupid :P Thanks!
On Mon, Feb 24, 2014 at 3:45 PM, Fredrik de Vibe <[email protected]>wrote: > Guido Rumi <[email protected]> writes: > > > Sure :D > > > > Im using OTP R16B03-1 with the mock default db. > > > > *src/model/movement.erl:* > > > > -module(movement, [Id, Description::string(),In::float(),Out::float()]). > > -compile(export_all). > > > > > > *src/controller_orillas_balance_controller.erl* > > > > -module(orillas_balance_controller, [Req]). > > -compile(export_all). > > > > sheet('GET', []) -> > > > > Movements = boss_db:find(movement, []), > > {ok, [{movements, Movements}]}. > > > > *src/view/balance/sheet.html* > > > > ..snip... > > > > <td>{{ mov.id }}</td> > > > > ...snip... > > > > works fine, but > > > > <td>{{ mov.in }}</td> > > I'm guessing 'in' is a reserved token. > > > crashes CB. > > > > > > > > > > > > On Mon, Feb 24, 2014 at 3:16 PM, Fredrik de Vibe <[email protected] > >wrote: > > > >> Guido Rumi <[email protected]> writes: > >> > >> > Hi! > >> > > >> > I'm having this beginner problem, I've thought of dirty hacks but I > feel > >> > like I'm missing something. > >> > > >> > If I try to print a float stored in a db with {{ mov.in }} in my > view, > >> CB > >> > crashes with lots of errors and warnings like > >> > [error] gen_server boss_web terminated with reason: no case clause > >> matching > >> > error in boss_load:'-load_views_inner/3-fun-1-'/5 line 408 > >> > >> This should not be a problem, and I also tested with David's fork to > >> ascertain this, using the mock db backend (the default). > >> > >> So, there's something else awry, can you provide more details? What db > >> backend do you use? Which erlang version? Can you provide the code in > >> question (controller action, model and view (at least the relevant > >> part))? > >> > >> Also, try to print the number in the console, using > >> > >> io:format("~p~n", [Value]) > >> > >> to ensure that it is what you think it is. > >> > >> > I have to make some arithmetic operations and print them in my > website. > >> I'm > >> > using David's fork https://github.com/davidw/ChicagoBoss > >> > > >> > Does anyone know an easy way to solve this? > >> > > >> > I've found this patch < > >> https://code.google.com/p/erlydtl/issues/detail?id=6>but I'm not sure > >> what to do with it. > >> > >> That is _old_, and it hardly looks relevant. erlydtl lives on github > >> now. > >> > >> > Thanks for your time > >> > >> > >> - Fredrik > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "ChicagoBoss" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected]. > >> Visit this group at http://groups.google.com/group/chicagoboss. > >> To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/chicagoboss/ygnmwqgkz89r.fsf%40rubin.ifi.uio.no > >> . > >> For more options, visit https://groups.google.com/groups/opt_out. > > -- > You received this message because you are subscribed to the Google Groups > "ChicagoBoss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at http://groups.google.com/group/chicagoboss. > To view this discussion on the web visit > https://groups.google.com/d/msgid/chicagoboss/ygnmsir8z6vw.fsf%40rubin.ifi.uio.no > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "ChicagoBoss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/chicagoboss. To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAEFYW554u5xQncaSW9TmPPSFuk36D%2BrAuKafLAu3trTE3XFfJw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
