I'm going to keep investigating this, as it seems like something  
others might encounter. Ideally, you'd want to be able to point the  
link_to_remote tag at the plain /users/signup action and get a form  
without the surrounding layout. In vanilla Rails (ie not Hobo), I'd do  
it with (in the controller):

def signup
   # setup @user
   respond_to do |wants|
     wants.js { render :layout => false }
     wants.html
   end
end

...but that doesn't work in Hobo. It should make a nice little recipe  
when I figure it out.

--Matt Jones

On Jul 11, 2009, at 9:36 PM, blueHandTalking wrote:

>
> Well, that did it!
>
> Thanks Matt.
>
> You may want to address this on Lighthouse, too.
> I filled out a ticket on it. I still do not know,
> would this be considered a bug?
>
> Anyway, since I am a NOOB it is hard to tell if
> its me having difficulties, or if its Memorex.
>
> I am using v.8.7 for the record.
>
> jet
>
> On Jul 11, 4:47 pm, Matt Jones <[email protected]> wrote:
>> Was able to replicate - this is part of the lifecycles stuff, which  
>> is
>> still having a little bit of teething troubles.
>>
>> Anyway, I got it to work by setting up the context in the same way
>> that creator_page action does [code in users/_signup.dryml]:
>>
>> <% o = User.new %>
>> <% o.exempt_from_edit_checks = true %>
>> <signup-form with="&o" />
>>
>> At least on my system (Hobo 0.8.8), the form fields didn't show
>> without the exempt_from_edit_checks part. The buttons showed up, so
>> that may not be exactly reproducing your situation. Also note that I
>> omitted the & sign from my previous post - if an attribute needs to  
>> be
>> evaluated, always remember the &!
>>
>> --Matt
>>
>> On Jul 11, 2009, at 7:24 PM, blueHandTalking wrote:
>>
>>
>>
>>> Out of curiousity, Matt, can you duplicate the results I am
>>> getting?
>>
>>>   jet
>>
>>> On Jul 11, 4:10 pm, blueHandTalking <[email protected]> wrote:
>>>> Just tried
>>
>>>>          <signup-form with="User.new" />
>>
>>>> ...and still turns out blank.
>>
>>>> Tried my test again, and it does render.
>>
>>>> Below is my front controller, and it does not say
>>
>>>>     hobo_model_controller
>>
>>>> but it does say hobo_controller inside the controller:
>>
>>>> /**********************************/
>>
>>>> class FrontController < ApplicationController
>>
>>>>   hobo_controller
>>
>>>>   def index; end
>>
>>>>   def search
>>>>     if params[:query]
>>>>       site_search(params[:query])
>>>>     end
>>>>   end
>>
>>>>   def loadpadsignup
>>>>     render :partial => '/users/signup', :layout => false
>>>>   end
>>
>>>> end
>>
>>>> /*************************************/
>>
>>>> jet
>>
>>>> On Jul 11, 3:52 pm, Matt Jones <[email protected]> wrote:
>>
>>>>> Out of curiosity, is FrontController a hobo_model_controller? I'm
>>>>> guessing not. You could also try calling <signup-form> with a with
>>>>> parameter, like this:
>>
>>>>> <signup-form with="User.new" />
>>
>>>>> in your partial.
>>
>>>>> --Matt Jones
>>
>>>>> On Jul 11, 2009, at 6:28 PM, blueHandTalking wrote:
>>
>>>>>> Matt,
>>
>>>>>> Tried your suggestion, I added:
>>
>>>>>>                       adding 'self.this = User.new'
>>
>>>>>> to the front_controller.rb.
>>
>>>>>> But that generated the following error:
>>
>>>>>> /***********************************/
>>>>>>    <h1>
>>>>>>  NoMethodError
>>
>>>>>>    in FrontController#loadpadsignup
>>
>>>>>> </h1>
>>>>>> <pre>undefined method `this=' for #&lt;FrontController:
>>>>>> 0xab5ae3c&gt;</
>>>>>> pre>
>>
>>>>>> /******************************************/
>>
>>>>>> I had the feeling that somehow I needed to generate a context of
>>>>>> 'user', but not
>>>>>> sure how to go about that.  I tried adding variations and the
>>>>>> same to
>>>>>> the users_controller.rb,
>>>>>> changing parameters in <link_to_remote>, but nothing has worked.
>>
>>>>>> Or it could be that this is indeed a bug. It seems
>>>>>> that you should be able to embed the user/signup wherever you  
>>>>>> wish,
>>>>>> and be
>>>>>> able to do so with a <link_to_remote> call.
>>
>>>>>> Eric
>>
>>>>>> On Jul 11, 2:18 pm, Matt Jones <[email protected]> wrote:
>>>>>>> You *need* to set self.this correctly for the form to render.  
>>>>>>> Try
>>>>>>> adding 'self.this = User.new' to your controller before the call
>>>>>>> to
>>>>>>> render.
>>
>>>>>>> --Matt Jones
>>
>>>>>>> On Jul 11, 2009, at 4:16 PM, blueHandTalking wrote:
>>
>>>>>>>> I still can not trace down where the sign-up form is generated.
>>
>>>>>>>> /users/signup works great, I can apply my own style and
>>>>>>>> location of
>>>>>>>> form by using <signup-form />,
>>>>>>>> however what I would like to do is use <link_to_remote> so I
>>>>>>>> can use
>>>>>>>> AJAX  to load the signup
>>>>>>>> form into my current document (which is  front/index.dryml).
>>
>>>>>>>> At this time I have:
>>
>>>>>>>> <%= link_to_remote('ARCHITECT SIGNUP',
>>>>>>>>                                :update => 'archsignup',
>>>>>>>>                                :url => {:controller => 'front',
>>>>>>>>                                :action => 'loadpadsignup'},
>>>>>>>>                                :success => "$
>>>>>>>> ('archsignup').style.visibility ='visible';
>>>>>>>>                                    $
>>>>>>>> ('archsignupbkgrnd').style.visibility = 'visible';") %>
>>
>>>>>>>> in application.dryml
>>
>>>>>>>> In front_controller:
>>
>>>>>>>>      def loadpadsignup
>>>>>>>>         render :partial => '/users/signup', :layout => false
>>>>>>>>      end
>>
>>>>>>>> And in users/_signup.dryml:
>>
>>>>>>>>     <signup-form />
>>
>>>>>>>> This gives me nothing in <div id="archsignup">
>>
>>>>>>>> If I replace  <signup-form /> with  "Here I am!" in
>>>>>>>> _signup.dryml,
>>>>>>>> <div id="archsignup"> gives me:
>>
>>>>>>>>       "Here I am!"
>>
>>>>>>>> If there is any way that I can use AJAX to load the <signup-
>>>>>>>> form />
>>>>>>>> or /users/signup into a location other than the default, I  
>>>>>>>> would
>>>>>>>> really like to hear about it.
>>
>>>>>>>> Thank you.
>>
>>>>>>>>   Eric
> >


--~--~---------~--~----~------------~-------~--~----~
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