> Basically, I have an after_save filter that gets called when you try to 
> save the page.  All I need to figure out now is how to get the page ID 
> of the record that was just saved, and more importantly, the parameters 
> that were entered into the partial added to the new and edit page. 
>
>   
You're on the right track.  It's easiest if the model is associated with 
Page, then you can just push the new objects into the association 
collection and not worry about the page id.  Otherwise, it's available 
via self.id inside that callback.  Add an attr_accessor with some 
variable-name that you check in the after_save callback... it'll just be 
a hash with the attributes passed into the form, which you can pass on 
to your associated model.
> If I understand it correctly, the PageAttachments uses AJAX for 
> uploading files to a temporary location and then saves them in the 
> after_save filter by iterating through an array that is populated with 
> the names of the files that were uploaded.  I don't need something that 
> complex (and I'd prefer not to use AJAX), so I'm wondering how to access 
> the text field!  (Let's say I have a text field called 'property' that I 
> would like to add).  I know that this may be a Rails issue (rather than 
> specific to Radiant), but I'm hoping someone can point me in the correct 
> direction with this.
>
>   
PageAttachments uses the magic of attachment_fu to do the file 
handling.  There's no Ajax, but there's some client-side Javascript to 
add and remove elements from the page. 

Let me know if there's anything else I can do to help!

Sean
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to