similar to: JS variable -> ruby?

Displaying 20 results from an estimated 10000 matches similar to: "JS variable -> ruby?"

2006 Jun 19
5
Global Count Variable
I would like to set up a global variable to count how many times a specific method is executed, but I would like the variable to keep counting regardless of sessions, restarting the app, etc. Is this possible? Or... I could just do a simple read/write to a text file on the server, but I''m not finding any good tutorials or examples about simple text i/o... any suggestions? Thanks!
2006 Jun 19
4
Oh, Don''t Forget... launches!
Just wanted to send a quick thank you to the contributers on this forum. Today, with the help of many around here, I launched ohdontforget.com! Ohdontforget.com allows US visitors to schedule sms text messages for a specific date and time, for free. Although I have officially, launched, there is still room for improvement. I used this project as a learning opportunity for Ruby on Rails and
2008 May 02
3
CruiseControlRb behind apache
I managed to find this in the archives, so far: http://www.nabble.com/Setting-up-CCRB-behind-apache-proxy-tt14016053.html#a14099749 Found a better alternative to doing this in my .htaccess instead of messing with the httpd.conf, in case someone is interested: --- snip --- RewriteEngine On ### for cruisecontrol RewriteBase / RewriteRule ^(.*)$ http://localhost:3333/$1 [P] AuthType Basic
2006 Jun 12
5
Method in Model
I have a simple method in a model, to send out e-mails via the script/runner. def Reminder.dropoff @messages = Reminder.find(:all, :conditions => [ "time < now()"]) @messages.each do |mes| Mailman::deliver_send_message(mes) end end However, it''s not sending e-mails. When this exact code was dropped in a controller, it worked great... is there
2006 Jun 09
4
app at root domain
I have my app up and running at www.domainname.com/controller/ ... but need to get it set up at just www.domainname.com I see that by default, rails is loading the pre-made index file in the /public dir. How can I override this without changing any directories around in my app? Thanks! -stirman -- Posted via http://www.ruby-forum.com/.
2006 Jun 08
3
Rails App, Going Live
I built my rails app locally, and just today put it all online. Getting a "Application error (Rails)" when trying to submit some form parameters to the db. What needs to be done with going from local development to live? I''m not sure if/where I need to set my app to "production" status. Also, is there any way to debug "Application error (Rails)"??
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern matching... In my controller, I''ll have a string that I will want to parse out to a datetime and a message, a la Google Calendar Quick Add. Examples: 10/30/2006 7pm message 10-30-96 7:00 pm message 10/30/2006 19:00pm message ... You see what I''m getting at. For a v1.0 release, I CAN publish some standards for
2011 Jul 13
14
Using timezone javascript to set Time.zone
I''ve got a javascript that provides me with the timezone for the client. I want to use this to set Time.zone so that all my times stored in the database are displayed in the timezone for the client. So really simplistically var timezone = jstz.determine_timezone().timezone Time.zone = timezone.olson_tz obviously this can''t be done. I''ve taken a look on the web and can
2008 Feb 13
2
javascript pop window from form how to update field back to main form
Hi I have question where I run web form. Now on this form I have one field with link select user. This link will pop up new window with javascript and on this window I have form with items which end user can select. Once selection is done end user press button Select User. Now I need to close that javascipt window and send back value of that selection back to form and to the field which has
2007 Nov 21
2
where do i get the return value of a javascipt method?
how do i get the value of a javascipt confirm() function? a(:href=>R(DeleteUser, @user.id), :onclick => "javascript:confirm(''You sure about this?'')"){label} any tips? thanks! -- |^^^^^^^^^^^^\ .|| |NALDEVNGELSTA.___||''""|""\___, | ________________ l | |__|__|_|) (@!)!(@)"""""**|(@) (@)****|(@)
2006 May 23
0
Passing a browser variable to Rails?
OK so for my first question, Background : I am trying to roll my own fuzzy-time representation algorithm. I want to pull the Timezone from the browser on page load. I was trying to do it through javascript, in the form of "var visitortime = new Date(); document.write("<SOME HTML ELEMENT" + visitortime.getTimezoneOffset()/60);" + ">"); and once that was
2006 Jun 13
0
Time Zone Offsets
I just finished a simple app to queue up e-mail based on an inputted date and time. The app works great, and Rails made building it a real pleasure. The one item I forgot to account for, was time zone offsets. If someone from a different timezone submits a date/time for an e-mail to be sent out... the time in the db currently gets saved as whatever they entered, explicitly, which means the
2017 Jul 05
0
Firefox 52.2.x and javascipt issues
> Date: Wednesday, July 05, 2017 15:51:30 -0400 > From: Scott Gennari <sgennari at simons-rock.edu> > Subject: Re: [CentOS] Firefox 52.2.x and javascipt issues > > On 07/05/2017 03:27 PM, Bernard Lheureux wrote: >> Hi all, >> >> Is it me or there are a lot of troubles with Firefox ESR 52.2.x >> and javascript ??? >> I face a lot of troubles with
2006 Mar 14
2
slider.js in ruby on rails
Hello, Is anyone using slider.js from script.aculo.us? I don''t understand how to integrate it into a form in rails. I want to do something like adjust (slide) age from 16-100. Thank You, jeff
2008 May 07
2
Inserting authenticity token into AJAX request params
Hi all. I am trying to find a way to insert an authenticity_token into the params of an Ajax request before it gets sent. I''ve got this much: Ajax.Responders.register({ onLoading: function(req){ if ((req.options.method == ''post'') && ! Object.keys(req.options.parameters).include(''authenticity_token'')){ ---->
2006 May 14
1
Dragable element
Hey all Im having a problem... Ok, this is the situation... I have a small product image, on which ive floated a div over it, and defined it as draggable. Now, this works, and i can drag it around no problem. great. but then, what i want to do is, based on the location of that dragable element from the top and the left, to move (using the Effect.MoveBy method) a larger image - so effective
2011 Oct 12
4
How to access controller's instance variable in a js.erb loaded by javascript_include_tag?
Hello! In rails 3.1 app I have a controller UsersController with ''show'' action. show.html.erb contains: <% content_for(:head) do %> <%= javascript_include_tag ''myscript'' %> <% end %> <p>Hello @user.name</p> And I have this in myscript.js.erb $jQuery(document).ready(function() { alert(<%= @user.name %>); }); @user is being
2008 Dec 19
14
Can duplicate "back" browser function in Rails?
In Rails I have a DB Table index.html.erb view. It has 100''s of items. When I gen via scaffold I get index, show, edit, update, etc view. But when I page down several pages, use the "show" link and then the "back" link I do not go back to where I was on the index view. Instead, I go back to the TOP of the index not the place where I clicked on the "show"
2004 Mar 05
2
3.8p1 not honoring TZ environment variable
Hello, I just built openssh 3.8p1 on an HP-UX 11i machine. All looks well except for the timezone. I'm noticing now that when it logs stuff to syslog, it's off by 2 hours for me. What I've figured is this: My timezone is MST7MDT (mountain time). The timezone in /etc/default/tz is EST5EDT (eastern time). There's a 2 hour difference between mountain & eastern time. What
2008 Jun 19
5
updated_at with client time not server time
Hi, I use the t.timestamps that are automatically added by rails. So there is the created_at and updated_at columns in the DB. When I create an entry those are filled with the server time when the request is created or updated. I want that to be the client time, if I do the request from Europe now I get US time in the DB. How to do it? Do I need to send explicitely time info from the client