How to remove attribute from object (Rails & Ajax) -


I am sending an application using the following hash:

  container = {"Client" = & gt; Customer, "Status" = & gt; "Success"} render: json = & gt; Container.to_jason   

customer is an object with a token and password.

I can not convert javascript, it asks that response in this size:

  $ Ajax ({{...}}, success: function (data) {if (data.status == "success") {... & lt I am trying to use data:  < Pre>  container = {"client" => client.to_json (= only: & gt; [: id :: first_name, last_name, address, phone:]), "status" = & gt; "Success"} render: json = & gt; container.to_json   

but such another .to_json handles as the first string and wrap it between quotes .

Can anyone have any idea to help me?

Very much blessed Ad.

Have you tried to use the piece ? < / P>

  container = {"client" => gt; client.slice: id, first_name, last_name, address:, phone}   



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -