Title / Description
Code def camera_callback if @params['status'] == 'ok' #create image record in the DB picture = Picture.new({'image_uri'=>@params['image_uri']}) picture.save tempObj = picture.instance_variable_get("@vars") WebView.navigate( url_for :action => :edit, :id => tempObj[:object] ) return "" end if @params['status'] == 'error' puts "Error with camera, perhaps camera is not enabled in build.yml." unless @params['message'].nil? puts @params['message'] end end WebView.navigate( url_for :action => :index ) "" end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code