Thanks stevo, I found that thread and tried it out with the stuff in  
the pastie,
but somehow it did not work out. I got some other errors.

But I manged to get it going:

I replaced

> < 
> %form_for 
>  :dump, :url=>{:controller=>"locations", :action=>"create"}, :html  
> =>  { :multipart => true } do |f| -%>

with the dryml version of the form tag. So here is my complete form:

<form multipart ="true">
    <%= file_field(:dump, :file, :class => 'file_input')%>
   <%= submit_tag 'Upload CSV' -%>
  </form>

Works now, and looks much conciser,
I am starting to like dryml.


Am 21.12.2008 um 14:12 schrieb stevo84:

>
> Check this out...
> http://groups.google.com/group/hobousers/browse_thread/thread/bbac84ead4f2950d?hl=en
>
> On Dec 21, 8:25 am, roland oth <[email protected]> wrote:
>> Hello
>>
>> I used to have a CSV Upload form working with 8.3. It is tied in in  
>> my
>> locations controller
>>
>> I extended the locations/new page by a file selection field by
>> extending in application.dryml. See:http://gist.github.com/38596
>>
>> I am now on Hobo8.5 and getting an error caused by this line:
>>
>> <%
>> form_for
>>   :dump, :url=>{:controller=>"locations", :action=>"create"}, :html  
>> =>
>> { :multipart => true } do |f| -%>
>>
>>    You have a nil object when you didn't expect it!
>>    You might have expected an instance of Array.
>>    The error occurred while evaluating nil.<<
>>
>> I tried various other versions of that syntax and but I am left what
>> to check next.
>> Maybe it is now neccesary to setup the dump object. Currently his is
>> not a model.
>>
>> I even set up a fresh hobo app to see if I missed something on the
>> move to 8.5
>>
>> Any hints, anyone: The object is to be able to upload a file from a
>> form. I am open to other suggested approaches
>>
>> thx roland
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to