similar to: (newbie) Missing Template Error using Rolling With Rails Tutorials

Displaying 20 results from an estimated 20000 matches similar to: "(newbie) Missing Template Error using Rolling With Rails Tutorials"

2005 Mar 09
9
Unit testing + instance variables
After *much* digging and playing around, I finally figured out how to unit test instance variables that are created by actions. It was more difficult than I expected. It seems like there should have been a more straight forward way to do this. Can someone enlighten me? A simplified and somewhat contrived example of what I am current doing: Thanks. Matt >> # My Controller of interest
2006 Mar 29
11
why belongs_to does not like validation?
This works : class Recipe < ActiveRecord::Base belongs_to :category end But (when I add validation) this does not work : class Recipe < ActiveRecord::Base belongs_to :category validates_length_of :category, :within => 6..20 validates_uniqueness_of :category, :message => "already exists" end thank you -- View this message in context:
2006 May 24
6
newbie question: missing template
Hi I''m new to this forum and new to Rails so excuse me if this is a daft question. I''m following the ONLamp.com tuturial and all has been well untill changing the template for the recipes. I have followed the instructions and added this code to the controller: class RecipeController < ApplicationController scaffold :recipe def list @recipes = Recipe.find_all end
2006 Jan 02
19
AR: How to store and restore in YML.
Hello- I have a database with entries that are segmented by customers. I would like to be able to store / delete / restore a particular customer''s information. I will need to rebuild the rows on restore and also rebuild the associations for the different tables. For example, customer { id name } companies { id customer_id (belongs_to) name } contacts { id
2006 Mar 03
13
Listing help
Hi, I''ve created a Rails application and am having a problem listing by a particular category in an associated table. I followed the instructions found at the O''Reilly tutorial (http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html?page=3) but have not had success. Can anyone please outline a better set of instructions than in the "Showing Recipes in a
2006 May 21
8
Rails and Postgres
Hi, I''m new to Ruby on Rails and am having a little difficulty working through the ''Rolling with Ruby on Rails'' tutorial. Can anyone help? I''m trying to get the cookbook application to work via a Postgresql db. But get the following error when trying to access http://127.0.0.1:3000/recipe/new Errno::EINVAL in RecipeController#new Invalid argument
2006 Jun 18
6
integer array columns
Postgres database. I have a categories table, with two columns id, and name. I have a recipes table, with a category_ids column. I want each recipe to belong to one or more category. in recipe_controller.rb I have this: def create @recipe = Recipe.new( @params[''recipe''] ) @recipe.category_ids = @params[''recipe''][''category_ids''].map{
2006 May 11
3
undefined??
When following the ONrails "Rolling on Ruby with Rails" tutorial part1 I (already) encountered the first complication. After doing those basic actions to set up the basic site, the tutorial tells me to overwrite the "list" method included in the "scaffold :recipe" method which we find in the recipe controller with this code: def list @recipes = recipe.find_all
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 Jan 19
6
One Last Question for me..
And then I should be ready to roll with my project.. I have some fine tuning of the looks to do after, but funtionality first! This is probably a rails question.. but I''m not sure where to sign up for the rails questions email group? (I guess I turned this into a 2 question email). I''ll ask here and then if someone will send me the url of where I go to sign up for the rails
2005 Mar 07
2
0.10.1 Upgrade problems
I just did an upgrade to Rails 0.10.1. It seems to have broken my app. I get this error (nothing works): ActionController::RoutingError (No route for path: ""): /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_controller/routing.rb:258:in `recognize!'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/dispatcher.rb:32:in `dispatch''
2006 May 09
6
Still Stumbled on First things in trying RubyOnRails
Still Stumbled on First things in trying RubyOnRails http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html http://instantrails.rubyforge.org/tutorial/index.html http://rails.homelinux.org/ I had tried the first of the top 12 tutorials and got stuck after adding a new field ?category_id?in the table recipes,
2006 Apr 11
4
cookbook2
I am a new user to RoR/ I have been working on RoR cookbook2 tutorial which could be found at http://instantrails.rubyforge.org/tutorial/index.html. As I have been going through different stages through trial and error, but now a stage has come that i m stuck and not able to proceed any further. when it comes to create a list.rhtml in recipe folder under views, and editing the code which is
2006 May 09
2
newbie: OSX Ruby/MySQL issue?
I''m three pages into the OnLamp RoR Tutorial [1] and am wrestling with what appears to be a MySQL connection problem. I''ve created a simple controller called "recipe" with a corresponding "recipes" mysql table. The recipe controller is just a simple scaffold. When I browse to "recipe/new", though, I get these errors: == NoMethodError in
2006 Apr 25
3
select boxe
yop, http://rubyonrails.org/api/classes/ActionView/Helpers/FormHelper.html ici j''ai vu qu''on pouvait g?n?rer des ?l?ment d''un formulaire gr?ce des m?thodes. Apres quelque petite recherches j''ai trouv? comment g?n?rer un select <%= select(''category'', ''category.id'', Category.find_all.collect {|category| category.nom})
2005 Mar 06
2
Recipe Browser 0.4.1
I am please to announce the release of Recipe Browser 0.4.1. This project (and files) can be located at http://rubyforge.org/projects/recipe/. This release brings Recipe Browser up to Rails 0.10, with a handful of bug fixes. Special thanks to E Gard (x2egard) the newest member to the project who also happened to do all the work for this release ;). We would love to hear any questions,
2006 Jan 10
1
sql server & linux: left join problem
I''ve got a left join problem of some sort connecting from linux FreeTDS/ODBC to SQL Server. It''s similar to the false post I had earlier, but this is a real problem. Here''s my code: def find_recipes_for_workorder @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :joins => ''left join workorder on
2006 Jun 24
5
Why is rails using DB objects that don''t exist?
I admit it--I''m newb right now. But only to rails, ruby and friends. I''m walking through a "recipe" tutorial but have been stuck for hours; it''s time to ask for help. On Windows I''ve got the latest ruby, rails, and webrick; I''ve got the Oracle OCI "thing" to talk to our Oracle 10g database, I''ve got Slick Edit and a
2007 Nov 27
2
Getting table field names from an object
If I had the following @recipes = recipe.find_all Is there a way to find all the field names returned by the query and the data in them. Thanks Martin -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2005 Oct 24
3
bogus find_all in Rails 0.14.1
I have the following statement cl = ChatEvent.find_all("ev_type <> #{t} and chat_id = #{@params [:chat_id]} order by created_at") which produces the following error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''order by created_at)'' at line 1: SELECT * FROM