similar to: Multiple (AJAX) Observers on the Same Field and MSIE

Displaying 20 results from an estimated 300 matches similar to: "Multiple (AJAX) Observers on the Same Field and MSIE"

2006 Aug 16
0
Multiple observer
Hi I have three drop downs (State, City, Locality) and would like to populate City based on State selection and Locality based on City selection. I have observers on two fields (State, and City). The observer_field on state works fine and it populates city based on state selection. But the observer on city doesn''t populate Locality. Now sure whats wrong with my code. here is the
2006 Aug 17
0
AJAX - Having Multiple SELECT (Drop Down), and dependency
Hi I have three drop downs (State, City, Locality) and would like to populate City based on State selection and Locality based on City selection. I have observers on two fields (State, and City). The observer_field on state works fine and it populates city based on state selection. But the observer on city doesn''t populate Locality. Now sure whats wrong with my code. here is the
2006 Apr 12
22
Dynamic Select Box
Hi, I''m new to rails/ruby having come from PHP and am just starting to get my head round how easy it can be :) However, can anyone point me in the right direction for dynamicaly updating a select box based upon the choice of a previous select box, without a page refresh. Any and all help greatly appreciated. Thanks -- Posted via http://www.ruby-forum.com/.
2011 Apr 08
3
Ruby on rails migration problem
Hello all, I have created a migration add_details _to users ... ( city_id , profession ) and then migrated it.. when i use params[:user] to update the database by taking user inputs from forms in views, it is not updating the database for these city_id and profession... ( not changing from null ) if add validation for presence of city_id .. it is giving the error "City id cant be
2006 Jul 25
6
form and pagination question
Hello, How do I get params from a form to use with a paginator? debug(params) shows this city: !map:HashWithIndifferentAccess id: "1" but in my controller, when I try to use @hotel_pages = Paginator.new self, Hotel.count(:conditions => "hotels.city_id = params[:city][:id]"), 3, @params[''page''] it doesn''t work. I suppose it''s a simple
2006 Mar 22
4
Newbie - populating select list from db
Can''t seem to find an example of this anywhere - how do I populate a select list in a form from a database? I have a form to create a new task. The task is for a client, so there should be a select list populated from my clients table. I thought this would work: <%= select ''task'', ''client_id'', Client.find_all, "id", "name"
2008 Jul 07
1
Non model cascading selects
In my model I have a city_id. ON the form I am using a cascading select to select the state, which then does a remote_submit to get the list of cities (and hence the city_id) for the selected state. The problem that I am having is that if I make a selection, hit SUBMIT and validation fails, the original selected state/city is now reset (ie, the values aren''t saved). Since they
2006 Jan 31
2
Relationship navigation issue
class Event < ActiveRecord::Base belongs_to :venue belongs_to :category end class Venue < ActiveRecord::Base belongs_to :city end class City < ActiveRecord::Base belongs_to :state end I want to retrieve all event records belonging to a state. Coming from hibernate background I tried something like this: def self.list_for_a_state(state_id) find_by_sql(["select e.*
2008 May 07
1
Assigning to the foreign key on a belongs_to association
I''ve encountered what seems like an odd omission in the behaviour of belongs_to associations: if you assign to the foreign key attribute, it doesn''t update the associated object (or mark a previously loaded one as stale) until you explicitly save or reload it. Let''s say we have a Company model, which belongs_to :city : >> torchbox =
2006 Apr 25
4
belongs_to :through
belongs_to :through Why is that not possible? We should have: Street belongs_to :city belongs_to :country, :through => :city -- Posted via http://www.ruby-forum.com/.
2008 Dec 05
1
Question About Rails.cache and find method.
The DB load on my site is getting really high so it is time for me to cache common queries that are being called 1000s of times an hour where the results are not changing. So for instance on my city model I do the following: def self.fetch(id) Rails.cache.fetch("city_#{id}") { City.find(id) } end def after_save; Rails.cache.delete("city_#{self.id}"); end; def
2006 Apr 04
4
Find records based on associated table''s colums
Hello, Let''s say I have a model for a "house". Each house has_a "city", which in turn has_a "state" which in turn has_a "country". The objective is to retrieve all houses in a given state, say "Massachusetts". Being new to Ruby on Rails what I like is that things that should be simple usually are simple, and since we have easy access to
2012 May 28
4
How to load a selection list into the method new of a controller?
Hi friends! I''m relatively new with Rails and I''m struggling for a long time with this problem (it should have a pattern solution but until now I didn''t find it): I have the following models: Institution, City, State and Country. class Country < ActiveRecord::Base has_many :states has_many :cities, :through => :states end # == Schema Information # Table
2010 Feb 03
4
customizing validation msg
Hi, i am using the default validation of RoR how i will customize them i dont want to display the default message but i want to print the message i want like for city_id the default message is "City can''t be blank" i want this message as "Please enter city" Regards -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All, just in a spot of bother with this gem, I am trying to create a new location and get the above msg. here is my controller: class LocationsController < ApplicationController # GET /locations # GET /locations.json def index @locations = Location.all @json = Location.all.to_gmaps4rails end respond_to do |format| format.html # index.html.erb
2007 Oct 26
1
Custom method in Application Controller
Hi All, I took this idea Christian Hellsten and Jarkko Laine''s "Beginning Ruby on Rails E-Commerce". Here is the situation. I will be using the "options_from_collection_for_select" and "collection_select" form helper methods in my view to render drop-down selection lists for City and State that have corresponding city_id and state_id foreign key references
2006 Jul 26
5
RoR data models ( extreme newbie question)
Sorry for asking this but I am keen to get on and build an app based on RoR and have had a look around at FAQa and the like with no immediate sucess. What I am looking for is an explainantion of the rules/requirements for table/index/coulumn names with RoR. RoR appears to have a set of expected naming conventions which it would appear you can over ride but it would seems a hell of a lot
2006 Oct 19
0
Typo in Apache docs causing MSIE problems?
Someone contacted me earlier today and pointed out this typo in the mongrel apache documentation: "the following line: BrowserMatch bMSIE !no-gzip !gzip-only-text/html must be written instead as: BrowserMatch \bMSIE !no-gzip !gzip-only-text/html The effect of this typo is that files that are not caught by previously listed rules, such as all *.css and *.js files are never deflated for MSIE
2011 Apr 16
1
Re: Problems extracting python-3.1.3.amd64.msi under wine's msie
Nathan Coulson wrote: > wget http://python.org/ftp/python/3.1.3/python-3.1.3.amd64.msi > msiexec /a python-3.1.3.amd64.msi /qb TARGETDIR=out #tried c:\\out as well > > and it exits immediately with the following (which I believe is a red > herring, 32bit also says this) > fixme:storage:create_storagefile Storage share mode not implemented. Please file a bug in bugzilla.
2005 Aug 05
0
US Federal Government to require MSIE for copyright preregistration
The following OT thread from fedora-list may be of some interest to this list also. https://www.redhat.com/archives/fedora-list/2005-August/msg00730.html https://www.redhat.com/archives/fedora-list/2005-August/msg00801.html Phil