Skip to content

Instantly share code, notes, and snippets.

@cmiles74
Created December 8, 2009 23:37
Show Gist options
  • Select an option

  • Save cmiles74/252105 to your computer and use it in GitHub Desktop.

Select an option

Save cmiles74/252105 to your computer and use it in GitHub Desktop.
def area
# only fetch the list of areas if we have a region
if !params[:region_id].blank?
@region = Region.find(params[:region_id])
@areas = @region.areas
# save the selected region
session[:region_id] = @region.id
else
@areas = Array.new
end
@area = Area.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment