Guest User

Untitled

a guest
Apr 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. new Ajax.Request(/note/create, {
  3. method: 'post',
  4. parameters: {'notes[rect_width]': note.rect.width,'notes[rect_height]': note.rect.height,
  5. 'notes[rect_top]': note.rect.top, 'notes[rect_left]': note.rect.left,
  6. 'notes[text]':this.gui.TextBox.value}
  7. });
  8. /*Fijate en el namespace notes[] que le pongo como parámetros, eso si es lo que espera el controlador
  9. tal y como lo tienes puesto*/
  10.  
  11. def create
  12. note = Note.new(params[:notes])
  13. note.save
  14. end
Add Comment
Please, Sign In to add comment