[Jifty-commit] r7436 - jifty/trunk/lib/Jifty/View/Declare

Jifty commits jifty-commit at lists.jifty.org
Tue Aug 25 02:24:18 EDT 2009


Author: sartak
Date: Tue Aug 25 02:24:18 2009
New Revision: 7436

Modified:
   jifty/trunk/lib/Jifty/View/Declare/CRUD.pm

Log:
Don't use an action to render the read-only records

    Using the update action for reading causes weird behavior like id
    not showing up because id is not updateable by the action

Modified: jifty/trunk/lib/Jifty/View/Declare/CRUD.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	Tue Aug 25 02:24:18 2009
@@ -437,22 +437,14 @@
     my $record = $self->_get_record( get('id') );
 
     return unless $record->id;
-    my $update = $record->as_update_action(
-        moniker => "update-" . Jifty->web->serial,
-    );
 
     my @fields = $self->display_columns;
     for my $field (@fields) {
         div { { class is 'crud-field view-argument-'.$field};
-            $self->render_field(
-                mode   => 'view',
-                action => $update,
-                field  => $field,
-                label  => '',
-            );
+            span { $record->$field };
         };
     }
-    show ('./view_item_controls', $record, $update);
+    show ('./view_item_controls', $record);
 };
 
 =head2 private template view_item_controls


More information about the Jifty-commit mailing list