similar to: Error in rendering json

Displaying 20 results from an estimated 10000 matches similar to: "Error in rendering json"

2010 Sep 26
1
Rails 3 basic Get JSON with jQuery and output on the page flow question
Rails newbie, thanks for help with this hopefully basic JSON type question.... I have a model Books in my app, which belong_to users. What''d I''d like to learn how to do, is use jQuery to get a JSON object of the books that the user owns (current_user). And then use jQuery to list the results out on a div (id=targetdiv). Where I''m not certain, is this something Rails 3
2011 Aug 25
7
How to safely embed JSON object in HTML document
Hi all, I''m working on a Backbone.js single page app with Rails 3.1, and in an attempt to save on HTTP requests, I want to embed initial data set in a HTML document that is sent back to the browser after successful login. I was thinking I can simply convert my ruby object to JSON, then HTML escape resulting string of JSON, and then use that as a value for JavaScript variable. Something
2010 Nov 06
0
Rails and JQuery and Ajax/Json question
Hi, I am using JQuery in my rails app. I''ve taken the approach outlined in Ryan Bates''s Railscast on jquery to do the following: jQuery.ajaxSetup({ ''beforeSend'' : function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} }); to set my ajax call request Headers to text/javascript so that my respond to block for javascript is
2010 May 28
0
Rails and JSON example?
Does anyone know of a demo or tutorial in which ... (1) In a browser some data is packaged up using JSON. (2) an async request is sent to a rails app sending the JSON data. I would like this to be done via jQuery. (3) A rails app deserializes the JSON data. (4) The Rails app then packages up some other data using JSON, again (5) The Rails app sends this data back to the browser. (6) jQuery
2012 Feb 20
1
respond_to format.json not being called
Hi all, I''m submitting a form using jQuery, but in the respond_to block only the format.html action is called. This is the javascrip: send_button.on(''click'', function(){ var form = $(this).closest(''.modal'').find(''form''); $.post(''/messages'', form.serialize(), function(data, status, xhr){
2010 Jun 24
0
Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
I''ve the following situation (which actually works in Rails 2.3.8 and this is a result of the migration of our app to rails3): I have a partial which is rendered a few times (imagine tr''s in a table). On the clientside there''s a script that does a json request for a specific row (jQuery + ajax dataType: ''json'' and type: ''POST'') In
2012 Jun 21
1
ActiveModel::Serializers::JSON support arbitrary keys
Is there a reason why AM:S doesn''t support arbitrary keys to serialization? I can see a lot of uses cases where arbitrary keys could come handy. Right now, if one tries to do it, AM:S checks if the keys match a method of the model and raises exception if it can''t find any. class Client < ActiveRecordBase attr_accessible :name, :address, as: :creator include
2010 Sep 17
0
Key Value Json ActiveModel::Errors
Hi all, I''m using Rails 3.0, and I have a model which validates if the attribute :name is present. On my my views, I use Jquery to submit the form which creates the model. If the name is not present, Rails returns something like this Json: [''Name is a required value''] Is there a way to make it return something like this? [''name'': ''Name is a
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys, I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I''m now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my app''s deletion link (for each item) trigger an alert box when the deletion
2008 Sep 25
2
jquery, format.js and IE
I''m trying to use jQuery to write all my js unobtrusively, and running into a bit of a problem when triggering the format.js block in IE6 (and possibly IE7). It returns the JSON string no problem, but instead of parsing it, IE6 asks to download the resource as a .js file. So if my url is ''/pictures/1.js'', IE6 will ask to save or run ''1.js'' I did do
2007 Aug 16
3
e c30ac536947f7330943f8de9c33f70ef2d5994e7
e, elemental, is a stack for the data web there are 4 components: earth, air, fire, water earth is a pure-ruby RDF triple-store, with a fs backend. no dependencies on 3rd party databases, just add filesystem (tm). theres also a ram backend built with the Mongrel URI-classifier trie as the primitive datastructure. from these two it should be easy to extrapolate how to write a memcached/hadoop
2006 Dec 06
0
Respond to and render JSON in [5694]
Hey, this is great to see this in trunk. It answers some questions I''ve been having about what is the best way to use JSON on the client side; it seems like the :callback approach is becoming the standard. A related question -- Prototype has this support for an "X-JSON" header that allows pure JSON to be sent in a response header and it gets evalled and passed to ajax
2010 Jun 08
8
rails, ajax, json, and script
Could someone please demonstrate the code to send both json (or xml) AND javascript (to be executed) in a single Ajax request? Is this even possible? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Aug 22
2
[LLVMdev] PR4174
On Aug 21, 2009, at 10:27 PM, Eli Friedman wrote: > On Fri, Aug 21, 2009 at 5:05 PM, Jakub Staszak<kuba at gcc.gnu.org> > wrote: >> >> On Aug 21, 2009, at 10:02 PM, Eli Friedman wrote: >> >>> On Fri, Aug 21, 2009 at 4:53 PM, Jakub Staszak<kuba at gcc.gnu.org> >>> wrote: >>>> >>>> On Aug 21, 2009, at 8:46 PM, Eli
2009 Aug 22
0
[LLVMdev] PR4174
On Fri, Aug 21, 2009 at 5:47 PM, Jakub Staszak<kuba at gcc.gnu.org> wrote: > > On Aug 21, 2009, at 10:27 PM, Eli Friedman wrote: > >> On Fri, Aug 21, 2009 at 5:05 PM, Jakub Staszak<kuba at gcc.gnu.org> wrote: >>> >>> On Aug 21, 2009, at 10:02 PM, Eli Friedman wrote: >>> >>>> On Fri, Aug 21, 2009 at 4:53 PM, Jakub Staszak<kuba at
2009 Aug 22
2
[LLVMdev] PR4174
On Aug 21, 2009, at 10:02 PM, Eli Friedman wrote: > On Fri, Aug 21, 2009 at 4:53 PM, Jakub Staszak<kuba at gcc.gnu.org> > wrote: >> >> On Aug 21, 2009, at 8:46 PM, Eli Friedman wrote: >> >>> On Fri, Aug 21, 2009 at 3:29 PM, Jakub Staszak<kuba at gcc.gnu.org> >>> wrote: >>>> >>>> On Aug 21, 2009, at 7:31 PM, Eli
2009 Aug 22
0
[LLVMdev] PR4174
On Fri, Aug 21, 2009 at 5:05 PM, Jakub Staszak<kuba at gcc.gnu.org> wrote: > > On Aug 21, 2009, at 10:02 PM, Eli Friedman wrote: > >> On Fri, Aug 21, 2009 at 4:53 PM, Jakub Staszak<kuba at gcc.gnu.org> wrote: >>> >>> On Aug 21, 2009, at 8:46 PM, Eli Friedman wrote: >>> >>>> On Fri, Aug 21, 2009 at 3:29 PM, Jakub Staszak<kuba at
2009 Aug 21
1
[LLVMdev] PR4174
On Aug 21, 2009, at 8:46 PM, Eli Friedman wrote: > On Fri, Aug 21, 2009 at 3:29 PM, Jakub Staszak<kuba at gcc.gnu.org> > wrote: >> >> On Aug 21, 2009, at 7:31 PM, Eli Friedman wrote: >> >>> On Fri, Aug 21, 2009 at 2:06 PM, Jakub Staszak<kuba at gcc.gnu.org> >>> wrote: >>>> >>>> Hello, >>>>
2013 Jul 19
0
Integrate jquery Grantt with my app in rails
Hi! I made a app in rails and have registed somethings... i would integrate jquery grantt with my app in rails. https://github.com/robicch/jQueryGantt Its is the project jqueryGrantt, he generate a json. I think that i could build a JSON with rails and integrate with the grantt... but, how? Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2] I perform an ajax call : ... $.ajax url: " /backoffice/expenses/rate" type: "GET" dataType: "json" data: project_id: $(''#project_id'').val() code: $(this).val() success: (result) -> alert result $(''#expense_price'').val(result) in