Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Ajax.Request(/note/create, {
- method: 'post',
- parameters: {'notes[rect_width]': note.rect.width,'notes[rect_height]': note.rect.height,
- 'notes[rect_top]': note.rect.top, 'notes[rect_left]': note.rect.left,
- 'notes[text]':this.gui.TextBox.value}
- });
- /*Fijate en el namespace notes[] que le pongo como parámetros, eso si es lo que espera el controlador
- tal y como lo tienes puesto*/
- def create
- note = Note.new(params[:notes])
- note.save
- end
Add Comment
Please, Sign In to add comment