similar to: Getting value from drop down for in place editor

Displaying 20 results from an estimated 50000 matches similar to: "Getting value from drop down for in place editor"

2010 Aug 02
1
Drop down boxes from table data
Hi I have another question for how best to do this. Now I have been following the tutorial at: http://www.tunaslut.com/learning-ruby-drop-down-lists-in-one-to-many-relationships, however when I change the view over from <% @cities.each do |city| %> <tr> <td><%=h city.city_name %></td> <td><%=h city.country_id %></td> to: <%
2006 May 31
7
Getting 22 elements
Hello, I''ve done === class HomeController < ApplicationController def index @country = Country.find(:all, :include => "cities") end end === And rhtml is: === <% @country.each do |country| %> <h1><%= country.name %></h1> <% country.cities.each do |city| %> - <%= link_to city.name, :action =>
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
2006 Jan 06
3
Countries -> Cities Select box
I am trying to play with a Countries -> Cities dynamically updating select box.that is if someone selects a country then all the cities of that country must be listed.Does anyone know of any data source for this? I searched for it but couldnt find any good usable source. Better still is there a module which I can mixin for this? Thanks Vivek -------------- next part -------------- An HTML
2006 May 17
0
in place editor value of text box
When using the in place editor, it creates a form with a text field having the name "value". In my in place editor tag, I want to use the value of that text field as one of the parameters passed to my action. I''m trying to use form.value.value but that doesn''t work (it doesn''t recognize form.value.value) <%= in_place_editor
2011 Jul 26
1
ActiveRecord has_many associations
Given the models Country, State, City and Person as follows. class Country < ActiveRecord::Base has_many :states end class State < ActiveRecord::Base belongs_to :country has_many :cities end class City < ActiveRecord::Base belongs_to :state has_many :people end class Person < ActiveRecord::Base belongs_to :city end Is there any way that doesn''t allow to delete
2010 Aug 20
5
country state city drop down list rails
hi every one please tell me the recommended way to get country state city drop down list in rails any gem - plug-in tutorial thanks in advance. -- 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
2006 Mar 20
3
Linking two HTML SELECT''s together
Hi, How do I link two HTML SELECT''s together. Let''s say for example that I have a drop-down list with a list of all countries. Once the user selects one of the countries I would like to make an AJAX call back to the server to populate the second drop-down list with all of the cities for that country. Any ideas on how to go about to do this? Regards Jerrie Pelser --
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 Jan 27
3
OT?: International number parsing
Can anyone shed some light on "rules" that might make the task of parsing the country code and city codes from a dialed number in the CDRs? I know that there is almost never a case where a concatenated country and city code could overlap with another country code, but what about city codes and local numbers? Is it possible for a concatenated city code and local number to match another
2006 Apr 26
3
drop downs
I''m having trouble getting a second drop down populated based on the value from the first drop down. I''ve tried following some of the examples posted, but haven''t had any success. I''m new to RoR so any help would be appreciated. When the first drop down''s value gets changed, it calls the correct method in the controller and even finds the correct
2006 Dec 11
6
easy question, how would i search a grandparent???!
hi, i have this in my code Article.find_by_contents("#{searchstring} +city:#{passedincity}") well that returns to me only articles that belong to whatever the user selected in city. now is it possible to search the grandparent? for example class country has_many states class states has_many cities belongs_to country class city belongs_to states ...... i would like to search
2006 Apr 27
3
How to create multiple selects with related content?
How to create such a multiple select box: the first box lists the countries, the second lists the states related to the country in the first select automaticly the third lists the cities related to the state in the second select automaticly Thanks -- Posted via http://www.ruby-forum.com/.
2006 Apr 01
3
Quick question about <% link_to something, :action => ...
Hi, I have a basic question. when i use <% link_to show_city, :action => ''my defined action'' :id => ''something'' %> //what is ID here? is this the parameter in my mysql db? basically how can i put a parameter into the link that when it hits my function, it can tell my function what to use as a condition to search. for example i have a table of
2006 Feb 27
2
list of countries, states, cp, etc.
I''m doing a registration form. I saw many registrations forms which asks you for a country and it lists all the countries of the world, and when you select a country the form is actualized with all the states or provinces, and when you select a state/province then the form is actualized with all the cities. I''m looking to do something like that, is there a free service or pay
2006 Jul 29
0
displaying select value and debugging RoR application
Folks, I am running into the following problem. I have a company model that has_many addresses and address belongs_to company (it also belongs to a User model but I assume that is irrelevant to this issue). I am in the list_companies view of the company_controller. When the user selects a company from the drop down I dynamically update the cities dropdown for the cities that the selected company
2006 May 17
3
RJS behave differently than render :partial?
I have a method in my controller like the following (the syntax may not be correct, I''m doing this from memory - you should be able to get the idea though) My rhtml page has a DIV with id="country_areas", which contains a partial that only makes a drop down of country areas for a specific country. When changing the country in the country drop down, it uses the
2011 Mar 10
4
Multi-model forms
Hi guys, I''m new to ruby and rails and I''m working on multi model forms, specifically 3. I''m using this http://guides.rubyonrails.org/getting_started.html as a start, and its got a 2 Model example but I cant seem to get the last one working. These are my models: Country name:string code:string (has_one :address) Address address_line1:string
2006 Apr 27
2
add city and point in the map
Dear Helpers: I'm trying to use packages "maps" and "mapdata" (see blow) to display the research resutls on map (Mid-Atlantic region). In particular, I need to mark a number of points in the map by giving their latitude and longitude information. For instance, I would like to mark a point on (long, lat) =(75.56027, 39.09271). Also, I need to mark several cities that I
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/.