Displaying 4 results from an estimated 4 matches for "country_area".
2006 Apr 26
3
drop downs
...the correct method in the controller and even finds the correct
country areas, but the results are not getting displayed in the partial
- the second drop down just remains blank.
Thanks for the help!
************* Controller
def new
@trip = Trip.new
@countries = Country.find(:all)
@country_areas = []
end
def find_areas_for_country
@country_areas = CountryArea.find(:all, :conditions => ["country_id
= :country", params])
render(:partial => "country_area", :collection => @country_areas)
end
*********** form
<tr>
<td><label fo...
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 :observe_field to call the below method and refresh the
country_areas partial.
def find_country_areas
@country_areas = Country...
2006 Jun 09
0
partials and rjs
I must have a misunderstanding of partials, maybe one of you can help me
out. I have a page that initially displayed via the following:
<-- in controller -->
def find_areas_for_country
@country_areas = CountryArea.find(:all, :conditions => ["country_id
= :country", params], :order => "descr asc")
render :partial => ''country_area''
end
<-- my partial -->
<%= select :country_area, :id, @country_areas.collect {|c| [c.descr,
c.id]}, {...
2006 Jun 15
0
return from controller not evaluating script
I am using this in my controller to reload the country_area partial in
my form
def add_country_area
render :update do |page|
page[:country_area].reload
end
end
<< in form >>
<span id="country_area">
<%= render :partial => ''country_area'' %>
</span>
<<...