Catalyst-Plugin-AutoCRUD

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/AutoCRUD/Controller/AJAX.pm  view on Meta::CPAN

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
sub create : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward($c->stash->{cpac}->{g}->{backend}, 'create');
}
 
sub list : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward($c->stash->{cpac}->{g}->{backend}, 'list');
}
 
sub update : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward($c->stash->{cpac}->{g}->{backend}, 'update');
}
 
sub delete : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward($c->stash->{cpac}->{g}->{backend}, 'delete');
}
 
sub list_stringified : Chained('base') Args(0) {

lib/Catalyst/Plugin/AutoCRUD/Controller/DisplayEngine/ExtJS2.pm  view on Meta::CPAN

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
        }
    }
}
 
sub create : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward('filter_from_ext');
    $c->forward('/autocrud/ajax/create');
}
 
sub update : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward('filter_from_ext');
    $c->forward('/autocrud/ajax/update');
}
 
sub delete : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward('/autocrud/ajax/delete');
}

lib/Catalyst/Plugin/AutoCRUD/Model/StorageEngine/DBIC/CRUD.pm  view on Meta::CPAN

312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
sub create {
    my ($self, $c) = @_;
    return &_create_update_txn($c, sub {
        my $c = shift;
        my $meta = $c->stash->{cpac}->{tm};
        my $rs = $c->model( $meta->extra('model') );
        return $rs->new({});
    });
}
 
sub update {
    my ($self, $c) = @_;
    return &_create_update_txn($c, sub {
        my $c = shift;
        my $params = $c->req->params;
        my $meta = $c->stash->{cpac}->{tm};
        my $rs = $c->model( $meta->extra('model') );
        return $rs->find(_extract_ID($params->{'cpac__id'} || ''), {key => 'primary'});
    });
}



( run in 1.407 second using v1.01-cache-2.11-cpan-49f99fa48dc )