Displaying 20 results from an estimated 30000 matches similar to: "Javascript object to Ruby"
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript
in this way?
<%
for i in interface_items[0].attributes
%>
var <%= i[0] %> = "<%=h( i[1] )%>"
<%
end
%>
Am I missing something really obvious?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2009 Jan 19
1
pass ruby array to javascript function
Im wondering how to go about passing a ruby array to a javascript
function. I was able to do this the other way around and pass a
javascript array to an action using JSON and convert it back to a ruby
array:
Object.toJSON(<%= array_or_string_for_javascript(@array) %>
then in the action I was able to do:
ruby_array = JSON.parse(params[:array])
But this time I want to pass an array to a
2005 Sep 30
5
Converting text into a javascript array
Hey Guys,
I know this isn''t specific to scriptaculous libraries but it''s something
that I''m exploring as I use the ajax functions in prototype. My
application server is not rails but java and I was thinking of returning
a javascript array in the ajax response. When I get back my response is
it, of course, text and I''m not sure how best to convert it into
2008 Sep 16
1
aggregate() does not return POSIXct object correctly (PR#12887)
Full_Name: Rene Locher
Version: 2.7.2 Patched (2008-09-12 r46541)
OS: XP
Submission from: (NULL) (160.85.231.40)
dat <- data.frame(event=factor(c("A","A","B")),
time=as.POSIXct(c("2008-01-10","2008-01-01","2008-01-04")))
min(dat$time)
## "2008-01-01 CET"
## as expected
2007 Jun 14
4
How to convert a table to JSON (or to Javascript array)
Is there a way to retrieve an HTML table in javascript and convert it
to JSON using prototype?
I''m stumped :(
phil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2007 Apr 28
6
RESTful web service tutorial?
Hi,
I would like to turn some of our simulation codes
out to pasture and string some of them together
by draping them in web services.
I''m looking for a RESTful Camping tutorial to get
started ... pointers appreciated.
Some simple example applications:
airfoil force calculator: feed it an airfoil
geometry, an angle of attack, and a Mach number,
and it returns the lift, drag, and
2007 Dec 22
1
Ajax.Updater and JavaScript functions
Hello all,
I have a script that uses a Ajax.Updater call to update the contents
of a DIV. The code being inserted includes a javascript function,
which is "called" by onClick event elsewhere in the HTML.
The page initially works fine in that the DIV gets the right content,
the Javascript inserted works fine.
The problem I have is that if I call the Ajax.Updater again then the
2010 Sep 06
5
how to call rails method from javascript method.
hi
I wanna call rails method from the javascript method.
It should be ajax call for rails method.
please help me.
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe
2008 Aug 20
1
Facebook javascript (FBJS) library
I wrote an fbjs library to help speed up development of some of my
applications. I plan to have some sort of "official" release with a blog
entry and github repository at some point, but I thought you guys might want
to have it earlier.
It''s still a work in progress. I''ve been using every method at least once in
my application but it''s still possible there is
2017 Jan 16
2
Leer archivos en formato JSON
Hola, disculpen la pregunta si parece trivial, pero hay algún paquete
o forma de leer archivos en formato "json"(1)?
(1) JSON, acrónimo de JavaScript Object Notation, es un formato de
texto ligero para el intercambio de datos. JSON es un subconjunto de
la notación literal de objetos de JavaScript aunque hoy, debido a su
amplia adopción como alternativa a XML, se considera un formato de
2006 May 24
1
How to marshal Javascript data?
I''m trying to marshal some information I have in Javascript, and send
it over an AJAX request to the server, specifically to be stored in a
model on the server side.
I have some Javascript routines I wrote that gather information about
the user selection. I see that the link_to_remote has a :before
option in which I can write Javascript to collect what I need, but
right now I''m
2005 Jan 17
2
bwplot: how not to draw outliers
RenE J.V. Bertin wrote:
> Hello, and (somewhat belated) best wishes for 2005.
>
> Can one order not to draw outliers in bwplot, or at least exclude them from the vertical axis scaling? If so, how (or what doc do I need to consult)?
> The options that have this effect in boxplot() do not appear to have any effect with bwplot (although outline=FALSE in boxplot does *not* change the
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
2007 Feb 04
3
Reference to dataframe and contents
This is probably easy for experienced users but I could not find a solution.
I have several R scripts that process several columns of a dataframe
(several dataframes and columns actually, but simplified for my question).
References such as:
myDF$myCol
are all over. I like to automate this for other dataframes and columns by
defining a reference only once in the beginning of the script.
One
2010 Apr 15
0
[LLVMdev] [cfe-dev] Living on Clang
I can't switch to clang on my project until it can handle boost headers.
On Thu, Apr 15, 2010 at 2:17 AM, Rene Rebe <rene at exactcode.de> wrote:
> Hi,
>
> On Apr 14, 2010, at 10:51 PM, Douglas Gregor wrote:
>
>> Hello fellow LLVMers and Clangstas,
>>
>> We want to make Clang great, and we need your help!
>>
>> Helping is easy: just build Clang
2004 Sep 17
1
controlling printing precision in paste()
Rene,
Look at ?format.
Sean
On Sep 17, 2004, at 9:21 AM, RenE J.V. Bertin wrote:
> Hello,
>
> I can't seem to find the way to modify the precision with which
> paste() prints its floating point numbers, more precisely the number
> of decimal digits printed. This is apparently not controlled by
> options( digits= ), and there is no appropriate argument to paste()
>
2007 Feb 15
2
floppy problems after DOS booting with dos.bss and syslinux 3.xx
Hello,
I'm Rene living in Germany.
I have a problem when I use syslinux versions greater
than 3.xx for booting DOS (over dos.bss) and DSL-linux
from a hard disk. (I've tried version 3.11 and the
newest 3.36). The problem occurred after booting DOS -
I can not access to the ordinary 3.5'-floppy drive
(e.g. the command "dir a:" fails after a while). DOS
not even notices
2011 Mar 14
1
Javascript & Rails future
Hi,
David H.H. announced recently that jquery is going to be the default in Rails 3.1, and that Prototype helpers / RJS are going into a gem.
What does that mean for the future? Should we progressively forget about things like javascript helpers, RJS, and all these fun parts of rails? And start coding with jquery/json in mind?
I''m not against that at all, but I have to admit I find RJS
2011 Oct 05
3
Rails 3 Select_tag in javascript give missing ; error
When I write
var x = "<%= select_tag(:activity_group,
options_for_select(activity_grp),{:include_blank => ''Create New
Group'', :style => ''width: 100px''}) %>";
where <% activity_grp = @activity_group.map { |ag| [ag.name,
ag.id] } %>
However, I get error (missing ; before statement) in Firebug because
var x = "<select
2010 Apr 15
1
[LLVMdev] [cfe-dev] Living on Clang
Hi,
On Apr 14, 2010, at 10:51 PM, Douglas Gregor wrote:
> Hello fellow LLVMers and Clangstas,
>
> We want to make Clang great, and we need your help!
>
> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development. Much of the Clang team has been living on Clang for at least several weeks already, and we've