On Tue, Dec 15, 2009 at 10:51 AM, Derek Wueppelmann <dwuep...@gmail.com>wrote:
> Hello all, > > I'm currently using FormBuilder to generate some forms to be used in my > Catalyst Application. However FormBuilder wants to have the same method > handle the submit as well as the display. For certain reasons this isn't > what I want. So I'm trying to set the action of the form to the correct > path. However FormBuilder only wants to take a path that is rooted for > it's action argument, for example: > > $form = $self->formbuilder(); > # Works: > $form->action('/path/to/method'); > > # Doesn't work: > $form->action('path/to/method'); > # Still doesn't work: > $form->action("http://example.com/path/to/method"); > > What I really want to be able to use is something like: > > $c->uri_for($self->action_for('method_name'), ...); > > However this returns a url complete with the HTTP. Is it possible to get > something similar that provides just the path (/path/to/method)? The > reason I want to do it this way is that I have some methods that are > submitting to URLS that contain captures. > > $c->uri_for returns a URI object. If you look at the pod there, you'll see the ->path method which returns exactly what you want. -J
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/