Doubts about how to set new actions only for ajax request on Noosfero

Rodrigo Souto rodrigo at colivre.coop.br
Thu Feb 6 18:17:09 BRST 2014


Hey Fábio,

Unless you determine the contrary, every action answers to ajax
requests. If your actions are not answering to them, you might check if
your controller (or your controller's father) does have some filter to
avoid that, since you can skip ajax request on actions by testing
request.xhr?. So that might be your problem.

You may need to create a new route because your action has
an unconventional path that is not contemplated by all those generic
routes on Noosfero. It has nothing to do with the action answering ajax
or not.

Fábio Teixeira escreveu isso ai:
> Actually we are developing some features that need to use ajax requests.
> But we always have the same difficulty, we try to create a new action into
> a controller but it doesn't accept ajax requests.
> 
> So we have to search in the controller for an existing action that accept
> ajax and use it.
> We'd love to know if Noosfero has an easier way to create an action that
> accepts ajax, without having to change the routes file.

> _______________________________________________
> Noosfero-dev mailing list
> Noosfero-dev at listas.softwarelivre.org
> http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev


-- 
Rodrigo Souto <rodrigo at colivre.coop.br> :: 55 71 8131-7714
Colivre - Cooperativa de Tecnologias Livres
http://www.colivre.coop.br/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20140206/780e84aa/attachment.pgp>


More information about the Noosfero-dev mailing list