busted InvitationRequest form
Ticket
+status
+priority
+tag
+commit
+issues
For my create-cards-for-people-i'll-invite-later issue, Ethan came up with the brilliant kluge of templating InvitationRequest then signing out and requesting invitations for them (which i could grant later when i wanted to). This looks like it will work (the templating does), but after successfully creating InvitationRequest+*template and saving it once, further editing gets:
"The format of this card (including any text that's not editable below) is governed by a "hard" [template][http://johnabbe.wagn.org/wagn/InvitationRequest+*template] connected to the [InvitationRequest][http://johnabbe.wagn.org/wagn/InvitationRequest] card."
(And i can't even delete the card! When i click the Remove button it goes connecting to server... done very quickly, but stays in Edit mode and the card is still there. Deleting and recreating it may not even have helped, but i thought i'd try.)
The problem is probably that InvitationRequest+*template is set to cardtype InvitationRequest, and i can't edit the cardtype - when i try i get:
"The format of this card (including any text that's not editable below) is governed by a "hard" [template][http://johnabbe.wagn.org/wagn/InvitationRequest+*template] connected to the [InvitationRequest][http://johnabbe.wagn.org/wagn/InvitationRequest] card."
(And i can't even delete the card! When i click the Remove button it goes connecting to server... done very quickly, but stays in Edit mode and the card is still there. Deleting and recreating it may not even have helped, but i thought i'd try.)
The problem is probably that InvitationRequest+*template is set to cardtype InvitationRequest, and i can't edit the cardtype - when i try i get:
NoMethodError in CardController#edit
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.update_attributes
RAILS_ROOT: /opt/johnabbe/current/config/..
/opt/johnabbe/trunk/app/cardtypes/invitation_request.rb:25:in `block_user'
/opt/johnabbe/trunk/app/models/card/tracked_attributes.rb:58:in `set_type'
/opt/johnabbe/trunk/app/models/card/tracked_attributes.rb:6:in `set_tracked_attributes'
#{RAILS_ROOT}/lib/rails_ext/attribute_tracking.rb:28:in `each_pair'
#{RAILS_ROOT}/lib/rails_ext/attribute_tracking.rb:28:in `each_pair'
/opt/johnabbe/trunk/app/models/card/tracked_attributes.rb:5:in `set_tracked_attributes'
/opt/johnabbe/trunk/app/models/card/permissions.rb:65:in `save!'
/opt/johnabbe/trunk/app/controllers/application.rb:190:in `handle_cardtype_update'
/opt/johnabbe/trunk/app/controllers/card_controller.rb:73:in `edit'
/usr/bin/mongrel_rails:19