similar to: forms, javascript and ajax - hopefully an easy question

Displaying 20 results from an estimated 10000 matches similar to: "forms, javascript and ajax - hopefully an easy question"

2008 Jul 09
4
Auto Postback in Ruby On Rails
in some other language have a concept e.i "auto postback" So, in Ruby on rails is there any such option e.i "auto postback" or same as "auto postback" basically what i want ot do is that i have 2 select box One for "Industry" and other for "Chemical" 1st we show all the industry in "Industry" select box. if we select any 1 industry
2009 Mar 01
15
Ajax in Rails
Hi All, New to the group, and new to learning rails. I''m having some trouble, i''ve done a few tutorials on creating some small apps with rails and am now starting to play around myself. I''ve been trying to create a simple form which when a user enters any data that data is displayed as a preview elsewhere on the page instantly, just like when creating an advert with
2008 Jun 19
5
observe_field
I have been trying to pass a collection_select parameter and a text field parameter to observe_field so that it watches both the parameters simultaneously. but what i can see is , when i select some value from drop down and dont write anything in text field its giving correct results.parameters are also correct passed, but just after that if i write something in text field that value also get
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2010 Jun 25
5
Error installing gems for Rails 3.0.0.beta4 on MacOSx
I tried to install Rails 3 Beta in my snow.leopard machine using the command below: (w/ sudo if it requires) gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n unfortunately after 12 gems installed i got an error regarding builder-2.1.2 12 gems installed Installing ri documentation for tzinfo-0.3.22... Installing ri documentation for
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type =>
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
Hi, Found a simple example breaking on moving to 2.2 from 2.0. This example illustrates the usage of nested :include finder options. class Book < ActiveRecord::Base has_many :distributors end class Distributor < ActiveRecord::Base belongs_to :book has_many :agents end class Agent < ActiveRecord::Base belongs_to :distributor has_many :shops end class Shop <
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment. However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set to "development" when my plugin''s init.rb is run. How do you configure a plugin to load require a file in the test environment? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ You
2008 Oct 11
8
Observing few fields in a form - Best Practise?
Hi, im looking to build a page similar to a shopping cart page. When you change the ''price'' or ''quantity'' fields, the total is calculated and displayed. There are other fields in the form which have no relation to this action. So i guess observe_form is not required. Can someone tell me what the best practise is for this?
2008 Apr 16
8
Will acts_as_taggable_on_steroids and better_nested_set work together?
I am having this crazy problem where it ONLY shows up in testing. This is my test code <code> def test_should_destroy task1 = Task.new(:description => "tmp", :done => false, :user => User.find_by_login(''admin'')) assert task1.save assert task1.destroy end </code> This is my task model
2009 Jan 05
5
ROXML versus simple to_xml
How they differ? Does the to_xml method of the classes array/hash/object is based on ROXML lib? As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we define the class (class Book in the guide) before to convert a object to xml. Moreover, the method to_xml (when not using "include ROXML") just accepts any existing object, what is much suitable. I need to compare and tranfer
2008 Sep 02
7
Deploying My Rails App
I have just finished my first Rails application following the lynda.com tutorial, but I am not sure how to get my application on the internet. I have an ftp account through the applemachine server, but from what I have read, I''m afraid I will not be able to host my application there. What I am looking for is step by step directions on how to get from a working Ruby on Rails application
2011 Aug 05
6
"bundle install" fails because of git gem
Hey everyone, I''m having an incredibly difficult time getting bundle to work properly on my production server. My production server setup: Ubuntu 10.04 Ruby 1.9.2p290 Rails 3.0.4 Passenger rvm 1.6.32 My Gemfile (relevant parts): gem ''linkedin'', :git => "https://github.com/renatosnrg/linkedin.git" Whenever I try to do "bundle install" I get this
2009 May 11
7
Upload file with url parameter
I want to upload file using get method. for example, "http://www.mydomain.com/upload?file=c:\test.exe" upload my local file to the remote server. I found one useful link about file uploading here(http:// www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm). Even I''ve changed some code in order to fit my rails version, it worked well. But the problem is I have use
2011 Aug 06
2
No javascript runtime on Heroku
Hello all, I developed an app using Rails 3.1 and uploaded it to heroku. When I typed rake db:migrate , I got the following error: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. Does heroku support Rails 3.1? They seem to have no Javascript runtime env''s like nodejs on their machine! -- You received this message
2008 Feb 25
6
Review Request for Significant Performance Improvement in ActiveRecord
I''m going through my old tickets, and I found an outstanding ticket that I''ve put many hours into, and is absolutely critical for a production project that I''m now updating to Rails 2.0.2. The ticket: http://dev.rubyonrails.org/ticket/9560 This comes on the tail of: http://dev.rubyonrails.org/ticket/9497 Which I believed to be the superior improvement due to a very
2008 Jul 15
9
Beginner Question.
I''m just getting into RoR, coming from a long PHP background. So far I LOVE IT! I''m hitting a roadblock with updating my mysql database. For simplicities sake, I have 2 tables and here are the relevant columns. Table Users id name email Table Issues id createdby assignedto reportedby In my models I have everything mapped properly I believe. When I try to update the
2010 Oct 06
6
Error on running unity test: "no such file to load -- 'active_record/version'"
Hi folks! I''ve been experimenting an error messagem when I try to run unity test in any model of my project. Here it is: /home/fabricio/shopcell/config/environment.rb:1:in `require'': no such file to load -- active_record/version (LoadError) from /home/fabricio/shopcell/config/environment.rb:1 from ./test/test_helper.rb:2:in `require'' from ./test/test_helper.rb:2
2011 Feb 27
10
How to store the same key multi times in a Hash ?
given an Arra tags[] I need to produce a resulting Hash as following .. { "$in" => [tags[0]], "$in" =>[tags[1], ...} in which the key should be always the same and the value being an Array I tried this : myHash = {} tags.each do |tag| h = {"$in" => [tag]} myHash.merge!(h) end but the merge! is only
2009 Sep 09
5
Newbie question: undefined method 'number_with_delimiter'(probably configuration problem)
Hi all: i am using gem to insall rails 2.3.3 and using $rails myapp to generate my application, but strangely i can''t use the number_helper below is my env: export RUBY_HOME=$HOME/ruby export GEM_HOME=$HOME/gems export RUBYLIB=$RUBY_HOME/lib:$RUBY_HOME/lib/ruby:$RUBY_HOME/lib/ site_ruby/1.8 export PATH=$HOME/gems/bin:$HOME/ruby/bin: and: $ locate number_helper.rb