search for: cities_controller

Displaying 2 results from an estimated 2 matches for "cities_controller".

2006 Dec 30
4
newbie question, "show items in selected city and category"
...ongs_to_many :cities end class Category < ActiveRecord::Base has_and_belongs_to_many :cads end class City < ActiveRecord::Base has_and_belongs_to_many :cads end I assume that user can act such way: first, from cities listing, which is produced by ''list'' method in cities_controller, the user chooses city ( clicks on ''show'' link). cities_controller#show contains the following: def show @city = City.find(params[:id]) @cads = @city.cads @categories_of_cads_in_city = @cads.map {|cad| cad.categories}.flatten.uniq end So, the user sees classified ad...
2008 Aug 15
7
Autotest and subclasses / namespaces
I am writing a controller admin/cities_controller.rb it inherits from AdminController, so it''s defined like class Admin::CitiesController > AdminController Whenever I save the controller file, autotest freaks out: uninitialized constant Admin::AdminController (NameError) I''m pretty used to just hitting CTRL-C to get aut...