search for: recipes_control

Displaying 7 results from an estimated 7 matches for "recipes_control".

2006 Nov 17
8
Basic search, quick question
...out an ID" error when I search. Here''s what I have: list.rhtml <%= start_form_tag :action => ''find_recipes'' %> <input type="text" name="search" /> <%= submit_tag ''Search'' %> <%= end_form_tag %> recipes_controller.rb def find_recipes @recipe = Recipe.find :all, :conditions => [''title LIKE ?'', "%#{params[:search]}%" ] redirect_to :action => ''results'' end def results @recipe = Recipe.find(params[:title]) end results.rhtml <%= @...
2006 Feb 21
0
Rails edge breaks my app
...7:in `count_collection_for_pagination'' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/pagination.rb:189:in `paginator_and_collection_for'' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/pagination.rb:124:in `paginate'' #{RAILS_ROOT}/app/controllers/recipes_controller.rb:8:in `list'' -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060221/bcac793c/attachment.html
2005 Mar 18
0
scaffold generator, pluralization and tutorials
Hi All the tutorials call their controllers ''TodoController''[1] or ''RecipeController''[2] (singular), but "script/generate scaffold Recipe" for example generates a ''RecipesController'' (in recipes_controller.rb) As I''m rather new to RoR I don''t know if that convention changed, I read something about it here: http://one.textdrive.com/pipermail/rails/2005-February/002388.html It''s a little bit confusing, when you try to follow the tutorials step by step... maybe this...
2006 Jan 23
2
scaffolding generators and pluralization rules
I''ve been working through the "Rolling with Ruby on Rails" tutorial and have come up against something I''m hoping someone here can help me understand. In part two of the tutorial, Curt introduces the "ruby script\generate scaffold re -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Feb 26
2
undefined method ... from `alias_method'
0 wicked var/www % ./script/console Loading development environment. >> r = Recipe.find :first NameError: undefined method `recipe_type='' for class `Recipe'' from ./script/../config/../config/../app/models/recipe.rb: 101:in `alias_method'' In recipes_controller: alias_method :orig_recipe_type=, :recipe_type= def recipe_type=(t) if t.nil? self.orig_recipe_type = guess_recipe_type self.recipe_type_is_guess = true else self.orig_recipe_type = t self.recipe_type_is_guess = false end end recipe_type is a column in my recipes table....
2008 Jun 23
2
NewB questions
...and am using Aptana with RadRails for development. I''ve installed the "recipes" demo application and have been poking around for the past couple of hours, and now I have a few questions about how things work: 1. Where''s the SQL? I see the methods that get the data in recipes_controller.rb, but can''t for the life of me figure out how Rails gets the info from the database, SQL-wise. 2. On the main recipes page, there is a link to create a "new recipe" with this code: <%= link_to ''New recipe'', new_recipe_path %>. I''m assuming n...
2006 Jun 12
5
Doing a simple search from the database?
I realize thi may be more complex issue than can be asnwered in this post. But, what I need to do is create a simple query on my existing tables via a search form. I have half my app done (I can write all the info I want to my database), but pulling the data out dynamically is giving me trouble. I have both the "ruby for rails" book and the Agile Development book. They both give