Skip to content

Commit

Permalink
[WebUI IntelliHome#7] Pushing the new room in to the stack in ModelFa…
Browse files Browse the repository at this point in the history
…ctory
  • Loading branch information
skullbocks committed Aug 20, 2014
1 parent 07f6266 commit b2ff9be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/IntelliHome/WebUI/Plugin/ModelFactory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ sub register {
push( @rooms, IntelliHome::WebUI::Model::Room->new( %{$_} ) )
for shift->app->rpc_call_blocking( "ask", "get_rooms" );
return @rooms;

#return [shift->app->rpc_call_blocking("ask","get_rooms")];
}
);
Expand Down Expand Up @@ -75,11 +76,10 @@ sub register {
build_new_room => sub {
my $room
= $_[0]->app->rpc_call_blocking( "db", "add_room", $_[1] );

# push( @{ $_[0]->app->rooms }, $room );
use Data::Dumper;
print Dumper $room;
# XXX:: Add room! missing javascript action after insert/delete
push(
@{ $_[0]->app->rooms },
IntelliHome::WebUI::Model::Room->new( %{$room} )
);
return $room;
}
);
Expand Down

0 comments on commit b2ff9be

Please sign in to comment.