Rails Database Entry, Values are all question marks -


i trying run create method in rails, insert items database. code create follows:

def create   @song = song.create ( { :song => params[:song],   :artist => params[:artist],   :album => params[:album],   :song_id => params[:song_id],   :longitude => params[:longitude],   :latitude => params[:latitude],   :stream_url => params[:stream_url],   :art_url => params[:art_url] } )    respond_to |format|     if @song.save       format.json { render :json => @song, :status => :created, :location => @song }     else       format.json { render :json => @song.errors, :status => :unprocessable_entity }     end   end end 

however, following error message. how ensure insert want?

started post "/create" 127.0.0.1 @ sun may 19 03:09:21 -0400 2013 processing songscontroller#create */* parameters: {"longitude"=>-72.6600766181946, "latitude"=>41.5570384662233, "album"=>"get lucky", "song"=>"get lucky", "artist"=>"daft punk", "stream_url"=>"http://api.7digital.com/1.2/track/preview?country=us&trackid=28905854&oauth_consumer_key=7dkn3ygtanwv", "art_url"=>"http://cdn.7static.com/static/img/sleeveart/00/026/861/0002686113_100.jpg", "song_id"=>28905854} warning: can't verify csrf token authenticity (0.1ms)  begin transaction sql (0.7ms)  insert "songs" ("address", "album", "art_url", "artist", "created_at", "latitude", "longitude", "song", "song_id", "stream_url", "updated_at", "user") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)  [["address", "2-16 mcconaughy drive, wesleyan university, middletown, ct 06457, usa"], ["album", "get lucky"], ["art_url", "http://cdn.7static.com/static/img/sleeveart/00/026/861/0002686113_100.jpg"], ["artist", "daft punk"], ["created_at", sun, 19 may 2013 07:09:21 utc +00:00], ["latitude", 41.5570384662233], ["longitude", -72.6600766181946], ["song", "get lucky"], ["song_id", 28905854], ["stream_url", "http://api.7digital.com/1.2/track/preview?country=us&trackid=28905854&oauth_consumer_key=7dkn3ygtanwv"], ["updated_at", sun, 19 may 2013 07:09:21 utc +00:00], ["user", nil]] (47.1ms)  commit transaction (0.1ms)  begin transaction (0.1ms)  commit transaction completed 201 created in 664ms (views: 1.8ms | activerecord: 48.8ms) 

-> completed 201 created

there no error message. record saved.

values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ...values ->... 

those question marks placeholders values follow. normal behavior.

each question mark replaced following values in order read. scroll right see values. looks there.

warning: can't verify csrf token authenticity 

this security issue. have included <%= csrf_meta_tags %> in layout?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -