Changeset 7

Show
Ignore:
Timestamp:
08/29/2006 08:55:19 AM (2 years ago)
Author:
matthew
Message:

Explicitly use IDs when building URLs; fixes #1 (Tim Lucas)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/auto-admin/lib/auto_admin_django_theme.rb

    r1 r7  
    110110      was_first, @first = @first, false 
    111111      if was_first 
    112         link = link_to( yield, :action => 'edit', :model => model_name, :id => @object
     112        link = link_to( yield, :action => 'edit', :model => model_name, :id => @object.id
    113113        %(<th class="#{klass}">#{link}</th>) 
    114114      else 
  • trunk/auto-admin/themes/django/views/edit.rhtml

    r1 r7  
    77 
    88admin_form_for params[:model], @object,  
    9   :url => { :action => 'save', :model => params[:model], :id => @object } do |builder| 
     9  :url => { :action => 'save', :model => params[:model], :id => @object.id } do |builder| 
    1010 
    1111  builder.outer do 
     
    1919<div class="submit-row"> 
    2020<% unless @object.new_record? %> 
    21 <p class="float-left"><%= link_to 'Delete', { :action => 'delete', :model => params[:model], :id => @object }, { :class => 'deletelink', :post => true, :confirm => "Are you sure you want to delete \"#{@object.to_label}\"?" } %></p> 
     21<p class="float-left"><%= link_to 'Delete', { :action => 'delete', :model => params[:model], :id => @object.id }, { :class => 'deletelink', :post => true, :confirm => "Are you sure you want to delete \"#{@object.to_label}\"?" } %></p> 
    2222<% end %> 
    2323<input type="submit" value="Save and add another" name="_addanother"  />