Re: POST and PUT problems on add action

2013-04-26 Thread Mancho
I agree, that is a correct way to solve. Check this site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html Murgan, Alexis Germán Desarrollador & Diseñador Web: german.murgan.com.ar Email: ger...@murgan.com.ar MSN: ger...@murgan.com.ar Móvil: +5493424663813 2013/4/26 André Luis > Yes, its

Re: POST and PUT problems on add action

2013-04-26 Thread André Luis
Yes, its the correct way to solve... POST is when you are creating a new record, and PUT is when you are updating a record... *¹ Cake doesnt uses really the PUT method, but a hidden field with the method. (I think it´s because most browsers doesnt support PUT method) *² When a validation error

POST and PUT problems on add action

2013-04-26 Thread Martin Aguilar
I'm new to cakephp and I'm start loving it but today I had a problem on adding new data (action add). After baking users table the result was public function add() { if ( $this->request->is('post') ) { I had add some validation on my model to names and more fields. The first push on submit bu

Re: CakePHP and jQuery DataTables

2013-04-26 Thread Saran Pal
Really Great! On Tue, Apr 23, 2013 at 5:48 AM, Fernando Nery Filho wrote: > So earlier today I found here in the group that a few people discussed > this, but I didn't find anyone who actually wrote the code, so I'm sharing > it so anyone will have something to start. > jQuery's DataTable is a r

Re: DropDown list fields for HasMany-BelongsTo association

2013-04-26 Thread Saran Pal
Hi Ahmed, Its simple, you may edit the User model, where its return the drop down values array, you can change the field name as you want. If feels difficulty then share you code. Cheers!.. Saran On Tue, Apr 23, 2013 at 12:06 PM, Ahmed Abdelsalam wrote: > Hi, > > I'm new to cakephp, and I cr

Re: Error on find on hasAndBelongsToMany relationed models

2013-04-26 Thread Saran Pal
Dear Ciul, As *Reuben* said HABTM generally doesn't do a join, but if you want to joins then you will need to set up an extra table in the database to handle this relationship. For more details you can visit here - http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#h

Re: Verificar se o usuário tá logado (CakePHP 2.x)

2013-04-26 Thread André Luis
$this->Session->read('Auth.Usuario.username'); Ou o mais correto... AuthComponent::user('Usuario.username'); Em quarta-feira, 24 de abril de 2013 18h50min47s UTC-3, Anderson Moraes escreveu: > > Pessoal, boa noite. > > Como eu faço a verificação abaixo no CakePHP 2.x??? > > if(is_null($session-