HI Ignacio,

I just ran into this bug again (or one closely related to it), so I went to git hub to find the issue you created back in July, but could not find it. Were you successful? If so, what is the solution?

Thanks,

Don Ziesig

On 07/17/2014 11:33 AM, Ignacio Huerta wrote:
It seems like the list did support the file. I'm going to create a
Github issue for this too and try to fix it ASAP.

Warm regards,
Ignacio

El 17/07/14 02:08, Donald Ziesig escribió:
Hi Ignacio,

The problem is *definitely* associated with having the controller in the
admin folder.  I created a minimal app that has only the user (editor)
table and the agent table.  If the agent controller is in the admin
directory and qualified appropriately Admin::AgentsController, the
problem occurs.  When I moved the agent controller to the controllers
directory and removed the Admin:: qualifier, the app works.

It is important to have the agent (and many other pages) in the admin
directory to keep the common users away from back office data.

I don't know if the list will take a 2.1 Mb tgz file, but I'm going to
try;-) .  Take a look at session_test.  It should fail.

Thanks,

Don

On 07/14/2014 11:19 AM, Ignacio Huerta wrote:
Hi Don,

I've been trying to reproduce your issue unsuccessfully. I have tried to
create a demo app:

https://hobo_extend_form_issue-c9-iox.c9.io/agents/new
https://github.com/iox/hobo_extend_form_issue

But I'm still unable to reproduce the issue, it might have something to
do with having the controllers under the admin directory.

Would it be possible for you to create and share a simple app
reproducing the issue?

Warm regards,
Ignacio

El 13/07/14 14:52, Donald Ziesig escribió:
Hi Ignacio,

I have been working on a part of the site that does not involve the
views at all.  Our Real Estate Multiple Listing Service has totally
revised their data format so I had to change the code that interprets
their data and populates one of the models (not involving the agent
model).  When I went back to using the views, I encountered this problem.

There is only one thing in application.dryml, that is the code that
extends the form for Agent.  The entire application.dryml is:

<extend tag="form" for="Agent">
   <old-form merge multipart>
     <field-list fields="name, front_index, website_name, website_url,
email, cell_phone, land_phone, yada,  default_agent, inactive, rentals,
residential, commercial, income, vacant_land,
html_name,lead_rotation_index, region" param/>
     <% p = "#{@agent.photo_file.html_safe}" %>
     <img src="data:image/jpeg;charset=utf-8;base64,#{p}" height="100"/>
     <%= file_field_tag 'photo_file' %>

     <div param="actions">
       <submit label="#{ht 'agent.actions.save', :default=>['Save']}"
param/><or-cancel param="cancel"/>
     </div>
   </old-form>
</extend>

but I get exactly the same problem if application.dryml is:

<extend tag="form" for="Agent">
</extend>

When I got your email, I removed the

<form for="Agent"/>

line but it made no difference.

When I remove the <extend tag ... > code, the problem goes away, but I
can no longer upload the agent's pictures.

The only unusual thing about this is that all of the controllers and
views are in the admin directory except for "front".  Also, today all of
the admin tabs work (unlike Friday when the only tab that worked was
Agents).  So now the failure is limited to view/front/index.dryml (this
has been modified slightly to remove the "edit this in index.dryml" and
add two buttons).

I have done as much as I know how to figure this out, but I've reached
the limit of my knowledge.

Thanks,

Don


On 07/12/2014 02:34 PM, Ignacio Huerta wrote:
Hi Don,

This is a nice mystery. I'd like to reproduce this problem, but I'm
gonna need a bit of your help:

>From your email, I understood that you added this exact code to
application.dryml:


    <extend tag="form" for="Agent">
    </extend>

    <form for="Agent"/>

First you are extending the form for Agent and then you are calling it
immediately below. This does not make much sense for me :S. In
application.dryml you define or extend tags, you don't usually "call"
tags. Maybe I misunderstood what you meant and you are putting "<form
for="Agent"/> in another view.

Anyway, do you have any idea about when exactly it started failing?
Could yoy give me instructions for me to reproduce the issue in a simple
app?

Warm regards,
Ignacio

El 12/07/14 16:44, Donald Ziesig escribió:
Hi All!

I have an app that was working fine a few days ago, but now it keeps
giving me an error on all forms EXCEPT the Agent form.

The error is:

|undefined method `form__for_agent' for class
`#<Class:0x007f7bb1653658>'|


The form is present in the code and when I select the agent form url
manually, it works fine. If I select any other form either via tabs or
url it dies.

I have extended the Agent form in application.dryml (for multi-part).
When I remove the extension, the error goes away (but the form no-longer
works correctly).  I returned a minimal extension to application.dryml
as in:

<extend tag="form" for="Agent">
</extend>

<form for="Agent"/>

Just this minimal code restores the error.

Is there a better place for the extension rather than application.dryml?

Any suggestions?

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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

--
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 http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to