You didn't want to use paperclip and paperclip_for_hobo? On Friday, January 6, 2017 at 9:01:40 AM UTC-7, donz wrote: > > Hi All! > > It has been a while since I did this (and hobo has changed significantly > in the interim), so my memory is fading (happens when you reach 74 ;-) ). > > I have a model *Attachments* that belongs to model *Email* such that: > > model *Attachments*: > > fields do > > filename : string; > contents : binary; > datatype : string; > > end > > belongs_to :email > > controller *Attachment*: > > auto_actions_for :email, [ :index, :new, :create ] > > def index_for_email > * * * > hobo_index_for_email *#????????? Is this right?* > end > > # etc. for new, create > > model *Email*: > > has_many :attachments, :accessible=>true, :dependent => :destroy > > children :attachments *# <<< D**oesn't seem to **change anything > whether present or not* > > The new and edit actions for *Email* show a list of *Attachments* as > expected (a series of text and textarea fields), but I really want to > change the underlying dryml so that it uses > > <input ... type="file"> > > (the results of which will populate the fields of the attachment record) > instead of the series of input fields for filename, content and datatype. > > Here is where my memory fails me. What dryml tags (auto generated?) apply > to the index_for_email, new_for_email, create_for_email methods? When are > these methods called (so far my log code doesn't show any sign of > invocation)? I have looked through all of the hobo documentation without > finding the answers. > > I can do the upload using my own file input tags from the *Attachment* > pages themselves, but I don't want those exposed to the users (for test > purposes I must manually enter the index of the associated email). All of > the rest of the app works fine using the data from the *Attachment* > pages. i.e., emails are sent with the specified attachments and received > by the recipients with valid files. All I need is the appropriate user > interface to finish this part of the project. > > I would really like the list shown by index to be series of attachment > file names with the ability to edit and a "+" button to add or a "-" button > to delete. The file name field would use html <input ... type="file"...> > > Thanks, > > Don Ziesig >
-- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
