search for: ingredients

Displaying 20 results from an estimated 136 matches for "ingredients".

2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to '&...
2006 Nov 14
3
messed-up habtm relationship
Hi, I have a many-to-many relationship between dishes and ingredients class Dish < ActiveRecord::Base has_and_belongs_to_many :ingredients end class Ingredient < ActiveRecord::Base has_and_belongs_to_many :dishes end I have a join table dishes_ingredients now when i access my_dish.ingredients, i get a list of what looks like Ingredient objects, but the...
2006 Jan 30
6
Looking for better code
Hi, I''ve been programming in RoR for about a week or 2-3, and I like it very much. Now, I have a certain problem that is very complicated, well for me at least :-) I have 3 database tables: recipes ingredients and another one which binds the previous 2 tables together Now, I want to have an input form where you can insert 1 recipe and a certain amount of ingredients, say 5. What do I do now: I put in my _form.rhtml-file a while loop, which generates 5 text_fields for the ingredients and i give them e...
2007 Nov 19
2
Help with controller and view
I have the following models class Recipe < ActiveRecord::Base has_many :ingredient_recipes has_many :ingredients, :through => :ingredient_recipes end class IngredientRecipe < ActiveRecord::Base belongs_to :ingredient belongs_to :recipe end class Ingredient < ActiveRecord::Base has_many :ingredient_recipes has_many :recipes, :through => :ingredient_recipes has_many :suppliers end...
2006 Jan 23
16
Adding form fields (extending a form) on the fly
Hello, I just can''t seem to find a way to extend a form dynamically in ROR. Say I am writing a recipe website. There is one form to enter the recipe. There is room for N number of ingredients (let''s say a text field for each ingredient name and selection list for the amount). What if the user wants to add more than N ingredients as he types them in? how do I do this without a POST, and have those new fields included in the request (i guess they need to have a unique name an...
2013 Jan 19
2
Deformulation and R
...ear All, I hope this is not too off-topic. Essentially, I need to know if there is any R package which can help me with a deformulation project. Suppose e.g. that you know from a chemical analysis the fat, mineral, vitamin, energy [and so on] content of a certain food product. You also know the ingredients of this product (e.g. milk, lactose, vegetable oil) and you know the chemical composition of each ingredient in terms of fat, minerals, vitamins etc... At this point the question, assuming that the procedure to create the product from the ingredients does not alter the chemical composition of...
2006 Jul 05
1
newbie question: Mapping Collections
Hi, Day 3 with rails here. Forgive me. If this has been covered many times before, pls just point me at the article. I worked through the Rolling with Rails tutorial (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) built up my cookbook. Things work great. I now want to add Ingredients to my app. So, a Recipe will have 1 or more Ingredients and any single ingredient can be referenced (belong to?) any recipe. How do I set up this relationship? With other languages I would create a mapping table in my database which had two columns, a Recipe index and Ingredient index. I could...
2007 Feb 03
2
Boost Sorting with Acts_as_ferret?
...gredient Text, Tags, and Description. The key is, I want to show all the results that come from Name, before I show any of the results from Ingredient Text, Tags, or Description. I tried doing this: acts_as_ferret :fields => { :name => {:boost => 9000, :store => :yes}, :ingredients => {:boost => 6000, :store => :yes}, :tags => {:boost => 3000, :store => :yes}, :description => {:boost => 1, :store => :yes}} I figured if I put huge boost on my fields, the "name" results would always come before ingredients (no matter what the scor...
2007 Aug 01
2
map.resources with habtm
Hi I''m trying to use restful resources with recipes and ingredients I''ve set up the models using scaffold_resource. A recipe can have many ingredients and an ingredient can be in many recipes. I''ve set the relationships up using a through. I now want to display a recipe with a list of ingredients but I''m unsure how to proceed. Should I u...
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
Greetings! I''m new to Ajax and am trying to get a basic app working as a vehicle for learning it. The app is an extension of the cookbook tutorial. My intent is to be able to add a list of ingredients for a recipe. The page to add ingredients uses Ajax. As ingredients are added to the page they''re displayed in a "green-bar" format like that used in the Depot tutorial. Ingredients are added to the page using form_remote_tag to update a <div> that contains 3 <span&...
2010 Mar 11
4
Call a controller method from a view
Hi, I am trying to call a controller method from my view, but I get an error and I don''t know how to correct it. What i am trying to do: I am in the edit form of the model Product, and products can have many ingredients. So on my edit form there is a text_field where you type the ingredient with a link "Add" which is supposed to add the typed ingredient to the current ingredients list. this is how i try to call my controller method: <%=link_to "Add",:action => :add_ingredient,:id => @...
2010 Mar 08
2
ActiveRecord::ReadOnlyRecord on attributes_update
Hi, I have a ActiveRecord::ReadOnlyRecord error when i update child attributes whereas when i create a new one it works fine. Someone had this error? Best, greg -- 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
2007 Aug 23
4
scoring problem in acts_as_ferret
Hi, I am using acts_as_ferret and have a problem with scoring. I would like to organize it in such way that, if any of the searched terms fits, I get 1.0 score as a result. I will explain it on the example. I have in index: a) "one two three four" b) "one two three" c) "one two" d) "one" When I search for "one" I would like to get 1.0 score for
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''
2007 Jun 28
2
CentOS iso for Sparc64 machine
Hi, I have been looking for CentOS for sparc based machines without luck. I tried to use birorrent to download it without luck. I really would appreciate anyone letting me know because I have a Sun Ultra 60 that I would love to install it on. Thanks! -- Dexter Dexter F. Stowers Systems Administrator Unix/Linux/Windows/Mac Clemson University -- Desire is the ingredient that changes the hot
2007 Oct 25
4
""throw $continue" is deprecated, use "return" instead"
...ngth;i++){ likesHTML+=obj.likes[i]+"<br/>"; } $(''likesList'').innerHTML =likesHTML; var recipeHTML="<h5>"+obj.initial+"''s favorite recipe</ h5>"; for (key in obj.ingredients){ recipeHTML+=key+" : "+obj.ingredients[key]+"<br/>"; } $(''ingrList'').innertHTML=recipeHTML; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are su...
2005 Mar 06
2
Recipe Browser 0.4.1
...nks 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, comments, or general feedback on the application. Features ------------- - Robust search capabilites. You can search for a recipe based on which ingredients it does or does not have, which categories it does or does not belong to, rating, spiciness, and source. - Dynamic and multiple categories. Each recipe can belong to any number of categories. Categories defined by user on the fly, so you are not limited to preset categories. - Ability to attach pl...
2009 Apr 16
6
Using Paperclip::Processor and RMagick to sharpen my thumbnails
Hi, I''m brand new to RMagick (and pretty new to Rails for that matter!). Right now, site owners are allowed to upload product and ingredient photos to the website. Everything works great, ingredients are sized down and proportioned correctly...the problem is that the resulting images are so blurry! So I''ve been doing some research and it looks like Paperclip::Processor may be the way to go. Here is what I have so far: *** RAILS_ROOT/lib/paperclip_processors/paperclip_sharpen_image.rb...
2015 Sep 16
2
LLVM linking problem
When I use clang on Windows to compile a program using regular expressions to intermediate code, then run the result through llvm-link and finally try to generate an executable, I get an error. All of these ingredients are necessary; it works if the program doesn't use regular expressions, and it works if I compile it directly instead of going via intermediate code. The use of the exact llvm-link binary, however, is not a necessary ingredient; I get the same result with a linking program of my own that uses...
2006 Apr 18
12
Formatting data drawn from a DB
Question for all: Right now i have a Table in a mySQL DB that has a row called Ingredients. When the data is entered into the DB its enter like so from a text area: 1 1/2 lbs. beef top sirloin, thinly sliced 1/3 cup white sugar 1/3 cup rice wine vinegar 2 tablespoons frozen OJ concentrate 1 teaspoon salt 1 tablespoon soy sauce 1 cup long grain rice 2 cups water 1/4 cup cornstarch 2 te...