In my rails app we have a ajax ask to a server, to store some data. This
used to work but any problem, though now we get an
error:ActionController::UnknownFormat (ActionController::UnknownFormat):
app/controllers/reservations_controller.rb:45:in `create'As following is a
controller and my javascript record where we announce a datatype do be
JSONclass ReservationController < ApplicationController respond_to :html,
:jsondef create...respond_to do |format| if @reservation.save
format.html do redirect_to '/' finish format.json { news json:
@reservation.to_json } else news 'new' finish finish
endendfunction.js$.ajax({ url: url_link, dataType: 'json',
type: 'POST', data: dataToSend })
Tuesday, 8 April 2014
Thursday, 3 April 2014
Add Attributes to Form Class
I wish to change a plcae of a messagebox in my c# concentration for
visible studio 2013. we found this
article:http://www.codeproject.com/Tips/472294/Position-a-Windows-Forms-MessageBox-in-CsharpIt
says "In your Form class, supplement these DllImport attributes."What does
this indeed need me to do? we went to my System.Windows.Forms reference.
If that's where we need to be do supplement this code, we have no thought
where it needs to be total within there as there is a lot of things going
on that we have no thought about.
visible studio 2013. we found this
article:http://www.codeproject.com/Tips/472294/Position-a-Windows-Forms-MessageBox-in-CsharpIt
says "In your Form class, supplement these DllImport attributes."What does
this indeed need me to do? we went to my System.Windows.Forms reference.
If that's where we need to be do supplement this code, we have no thought
where it needs to be total within there as there is a lot of things going
on that we have no thought about.
Tuesday, 1 April 2014
Give a time between tasks - iOS
I'm removing my plcae position from a iPhone's GPS. we wish to get a
coordinate from a same indicate 15 times (to get a best plane accuracy).Is
there a proceed to wait for example, 2 seconds between one coordinate and
another?I use an vigilant called coordinate, with embodiment and longitude
as property..... Exemple codeCoordinate * coord = [[Coordinate alloc]
init];NSMutableArray *coordinates = [[NSMutableArray alloc] init];for (i=0
; i<=14; i++){ coord = newlocation; [coordinates addObject:coord];
.... some formula to wait 2 seconds before supplement a new vigilant to a
array....}I attempted to use NSThread sleepfortimeinterval, though a
perspective freezes.Thanks
coordinate from a same indicate 15 times (to get a best plane accuracy).Is
there a proceed to wait for example, 2 seconds between one coordinate and
another?I use an vigilant called coordinate, with embodiment and longitude
as property..... Exemple codeCoordinate * coord = [[Coordinate alloc]
init];NSMutableArray *coordinates = [[NSMutableArray alloc] init];for (i=0
; i<=14; i++){ coord = newlocation; [coordinates addObject:coord];
.... some formula to wait 2 seconds before supplement a new vigilant to a
array....}I attempted to use NSThread sleepfortimeinterval, though a
perspective freezes.Thanks
Subscribe to:
Comments (Atom)