search for: categories_controller

Displaying 6 results from an estimated 6 matches for "categories_controller".

2005 Feb 27
12
Four Days on Rails
There are a number of really good beginner''s guides to Rails on the web now - covering installation through to running the first ''scaffold''. However, as a complete Ruby newbie, I found the next stage - moving on to producing ''real'' applications - quite hard going. To help others make the same journey, I''ve put together a ''next
2006 Apr 08
0
Typo and Instant Rails 1.2
...h the spinner running even after the *publish* button is clicked. The changes, themselves, do appear in the actual blog. When the *Sort Alphabetically* is clicked under categories an error occurrred. I changed the code as follows: C:\InstantRails-1.2\rails_apps\typo1000\app\controllers\admin\categories_controller.rb <typo:code lang="ruby"> def asort Category.reorder_alpha #render_component :action => "category_container" - Removed and added two lines below - Ed Gard @categories = Category.find(:all, :order => :position) render :partial => "categories&qu...
2006 Feb 22
3
Listing/Relationship Question
...imple, but for some reason I just can''t get it! What I want to do is click on a post and display all the categories that the post is in. class Post < ActiveRecord::Base has_many :categories end class Category < ActiveRecord::Base belongs_to :post end ...simple enough. In the categories_controller I have this: def list_all_categories @post = Post.find(params[:id]) @categories = Category.find_all(params[:post]) end In the list_all_categories view: <% @categories.each do |cat| %> <%= cat.name%> <% end %> The problem is that all the categories are showing u...
2008 Jun 04
0
routers are handled incorrectly on production
...ction"=>"orders", "id"=>"new", "controller"=>"admin"} ActionController::UnknownAction (No action responded to orders): The file hierarchy is: $ ls -xR1 ./app/controllers/ ./app/controllers/: admin admin_controller.rb application.rb categories_controller.rb category_controller.rb info_controller.rb login_controller.rb search_controller.rb store_controller.rb ./app/controllers/admin: orders orders_controller.rb ./app/controllers/admin/orders: line_items_controller.rb -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name --~--~--------...
2010 Mar 08
0
betternestedset in rails 3.0
...def new cat = Category.new cat.text=''test'' cat.save cat.move_to_child_of(Category.find_by_id(1)) #26 redirect_to :action => ''index'' end It gives me this error : "You cannot move a node if left or right is nil" app/controllers/categories_controller.rb:26:in `new'' Database looks like this : "id" "parent_id" "lft" "rgt" "text" ---------------------------------------------- "1" "NULL" "1" "2" "1000" "2" "NULL&q...
2006 Apr 22
6
nOOb question: How to use find_all with form input data
Hello, I''m having a problem utilizing the find_all method with a value from a form. I keep getting the following error: Mysql::Error: #42S22Unknown column ''category_id11'' in ''where clause'': SELECT * FROM items WHERE (category_id11) The controller seems to be getting the correct data, but my key and value seem to be mashed together(it''s