You should be able to just extend the form and tell it the subsite, but if your controller doesn't understand a post then there's something else going on
On Mar 8, 3:17 pm, Chris Beeson <[email protected]> wrote: > Thanks Bryan, > > At the moment the login page is posting to users/login and not > admin/users/login so your first guess is correct... > > <form action="/login" class="login" method="post"><div > class="hidden-fields"><input id="page_path" name="page_path" type="hidden" > value="users/login" /></div> > > So (unsure how to do this) I saved the html to the desktop, changed it for > testing to... > > <form action="http://localhost:3000/admin/users/login" class="login" > method="post"><div class="hidden-fields"><input id="page_path" > name="page_path" type="hidden" value="admin/users/login" /> > > It does post to admin/users/login but I get ... > > Read error: #<NoMethodError: undefined method `model' for > UsersController:Class> > > But I'm not sure if that because I'm just displaying a html page from a file? > > > Am I able to change the actions of the login form in dryml? > > Cheers > > Chris > > On 8 Mar 2010, at 20:52, Bryan Larsen wrote: > > > Yes, I'm not surprised that is what is happening to you. > > > At a first guess, I suspect that the problem is in the login form and > > friends. As a test, could you create an html page that submits to > > /admin/users rather than /users? IOW, copy the HTML from /login and > > tweak it to submit to /users and see if that works. If it does, > > please create a lighthouse ticket. If not, keep posting here. :) > > > cheers, > > Bryan > > > On Mon, Mar 8, 2010 at 2:28 PM, Hero1000 <[email protected]> wrote: > >> Yes I know, that's what I have been following (and have done many many > >> times!) but keep having the same issue. If I generate a admin/ > >> users_controller hobo still uses my root users_controller to > >> authenticate my user model( a hobo_user_model) > > >> I need all the hobo login system to use only admin/users_controller, > >> so my main app can use the root users_controller... > > >> I hope that makes sense and thank you again > > >> Chris > > >> On Mar 8, 6:58 pm, Owen Dall <[email protected]> wrote: > >>> Bryan did a recipe for this very thing... > > >>> Take a look at this: > > >>>http://cookbook.hobocentral.net/tutorials/subsite > > >>> Let us know if that helps... > > >>> -Owen > > >>> On Mon, Mar 8, 2010 at 11:51 AM, Hero1000 <[email protected]> wrote: > >>>> Thank you Owen that was very helpful indeed. > > >>>> However I do have one last problem.... > > >>>> So I have an admin subsite which works beautifully... if the > >>>> users_controller in the root is a hobo_user_controller, which I am > >>>> really trying to avoid as my main site is an XML service and is > >>>> completely separate from anything hobo. > > >>>> I have been playing with if for about a day now and I can see that the > >>>> users_controller in the root is used for the authentication system > >>>> only and then the users_controller in admin is used for rendering the > >>>> subsite and does so correctly.... > > >>>> Do you know of a way that I could have the authentication system (the > >>>> root users_controller) to operate and live only from within my > >>>> subsite? > > >>>> Many thanks in advance for all your help > > >>>> Chris > > >>>> On Mar 7, 10:30 pm, Owen Dall <[email protected]> wrote: > >>>>> Have you seen Bryan's Tutorial #24 in "Rapid Rails with Hobo" , called > >>>>> "Creating an Administration Sub-Site"? > > >>>>>http://hobocentral.net/books > > >>>>>http://screencast.com/t/NTA5M2Q3N > > >>>>> Let us know if that doesn't help. > > >>>>> -Owen > > >>>>> On Sun, Mar 7, 2010 at 4:51 PM, Hero1000 <[email protected]> wrote: > >>>>>> Hi, I trying to make an admin site for a rails xml web service and > >>>>>> seem to be having a whole host of different problems. > > >>>>>> One of them is easily repeatable - if you make a new hobo app, and > >>>>>> then generate an admin site and visit it you receive the error > >>>>>> undefined method `signup_form'... > > >>>>>> Extracted source (around line #17): > > >>>>>> <% if User.count == 0 -%> > >>>>>> 15: <h3 style="margin-top: 20px;">There are no user accounts > >>>>>> - please provide the details of the site administrator</h3> > >>>>>> 16: <do with="&User.new"><% this.exempt_from_edit_checks = > >>>>>> true %> > >>>>>> 17: <signup-form/> > >>>>>> 18: </do> > >>>>>> 19: <% end -%> > > >>>>>> How can I get around this? > > >>>>>> Also I am using my own user model, but for the authentication system > >>>>>> to work i have had to generate a user model and then make the > >>>>>> appropriate changes to it. Which seems fine, and I can log in and out > >>>>>> ect. Then for reasons still unknown to me suddenly the authentication > >>>>>> bar at the top completely disappears and I am left with no active > >>>>>> system at all. What would cause this? > > >>>>>> Many thanks in advance for any thoughts. > > >>>>>> Chris > > >>>>>> -- > >>>>>> 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]<hobousers%2bunsubscr...@googlegroups > >>>>>> .com> > >>>> <hobousers%2bunsubscr...@googlegroups .com> > >>>>>> . > >>>>>> For more options, visit this group at > >>>>>>http://groups.google.com/group/hobousers?hl=en. > > >>>>> -- > >>>>> Thanks, > >>>>> - Owen > > >>>> -- > >>>> 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]<hobousers%2bunsubscr...@googlegroups > >>>> .com> > >>>> . > >>>> For more options, visit this group at > >>>>http://groups.google.com/group/hobousers?hl=en. > > >>> -- > >>> Thanks, > >>> - Owen > > >> -- > >> 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 > >> athttp://groups.google.com/group/hobousers?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/hobousers?hl=en. > > -- 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.
