similar to: accessing to a table (model)

Displaying 20 results from an estimated 10000 matches similar to: "accessing to a table (model)"

2006 Apr 29
1
can i alter the _form.rhtml without have troubles to validat
hello my name is reynaldo and i have a problem i alter the _form.rhtml to display a select option in the place a simple text_box, and the application work very well, but in the moment that i apply a validation in the model i get a error. the code is the next in the controller: def new @catelemento = Catelemento.new @komandancias = Catcomandancia.find(:all) end in the
2006 Jan 18
3
Partial Problems
Hey guys, I''m having a little trouble working out partials. I have successfully made a partial work in my list.rhtml, but as I see it on the 15min introductry video. They guy uses one partial on multipul pages. At the moment I am trying this in my show.rhtml, I write <%= render :partial => "journal" %> and I get this. NoMethodError in Write#show > > Showing
2006 Apr 01
10
You have a nil object when you didn''t expect it!
Hi, I am creating a blog to learn ruby on rails. I have 2 different views/models/controllers, 1 called post and 1 called comments. How do i link a post from the views/post directory to the comments that belong to the post in the views/comment directory. This is the code in the post/show.rhtml <%= render :partial => "post", :object => @post %> <%= link_to
2009 May 29
1
[PATCH server] fixed UI update bug -- ignore task_types when it doesn't exist
Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/views/task/_show.rhtml | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/app/views/task/_show.rhtml b/src/app/views/task/_show.rhtml index f4e001d..ff7d434 100644 --- a/src/app/views/task/_show.rhtml +++ b/src/app/views/task/_show.rhtml @@ -75,7 +75,9 @@ <img
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box displayed at the top of the checkout as described in the tutorial and I cannot seem to discover where I have erred. The scaffold.css is copied from the pragmatic programmers site: #-------------------------------------------------------------------- $ cat public/stylesheets/scaffold.css body { background-color: #fff;
2006 Mar 04
5
has_many and belongs_to example?
Hi! If i have 2 tables i.e. product and images and product has_many images, image belongs_to product - how to create _form.rhtml, new/create and edit/update methods in product controller, so in a single form i can add one product and MANY (let''s assume for now that this number is fixed) images for this product? Pleeeeease help me :) -- Posted via http://www.ruby-forum.com/.
2009 Aug 04
3
[PATCH server] require at least one vm network if pxe booting
--- src/app/models/vm.rb | 2 ++ src/app/views/vm/_form.rhtml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb index 3e0a6fa..9d326ac 100644 --- a/src/app/models/vm.rb +++ b/src/app/models/vm.rb @@ -464,6 +464,8 @@ class Vm < ActiveRecord::Base
2010 Feb 25
2
[PATCH] Enhance vms display
It can be quite hard to manage a pool of 40-50 VMs without informations about the OS running, the contact (which is the only one to know when the vm can really be destroyed) or an End Of Life date. This patch add those fields, and rework a little the VM list view, in order to show gracefully those new fields. It has been made at the expense of UUID, Total Run Time & Load fields. Since those
2010 Sep 02
1
[PATCH 1/1] Introduce an option to always pxe-boot a vm.
Previously, a pxe-booted vm would always boot to HD at next startup. Signed-off-by: Nicolas Ochem <nicolas.ochem at alcatel-lucent.com> --- src/app/controllers/vm_controller.rb | 1 + src/app/models/vm.rb | 15 +++++++++++---- src/app/views/vm/_form.rhtml | 2 +- src/task-omatic/taskomatic.rb | 13 +++++++++++-- 4 files changed, 24 insertions(+), 7
2006 Jun 23
5
how can i alter the validations error messages.
hello my name is reynaldo my question is the next. i want change the text of the validations error messages generated by ruby when you don''t wrote properly the data in the form. -- Posted via http://www.ruby-forum.com/.
2010 Sep 03
1
[PATCH] Adding some control over usages in the network creation/edition form
Signed-off-by: Simon COURTOIS <scourtois at linagora.com> --- src/app/controllers/usages_controller.rb | 13 +++++++ src/app/models/usage.rb | 2 +- src/app/services/usage_service.rb | 23 ++++++++++++ src/app/views/network/_form.rhtml | 56 +++++++++++++++++++++++++++++- src/config/routes.rb | 1 +
2006 Jun 30
3
passing parameters to functions
I''m new with ROR and am confused about passing parameters to functions. I have a controller called Schedules and that calles a calendar helper for a view called show_cal.rhtml. I need to be able to pass in a specified month and year to get the correct schedule calendar to display in the view. I''m just starting with this and am simply trying to display the parameters
2006 Apr 28
3
Error with show.
Hello everyone, I have a problem while opening something like /main/show/1 Here is the template for show.rhtml <% for name in @names %> <div> <h2><%= name.full_name %></h2> </div> <% end %> And here is the code specific to the show on the main_controller.rb def show name = Name.find(params[:id]) end And here is the error im getting. You have a
2006 Apr 24
4
creating a select box
Hi trying to create a select box in _form.rhtml. I have a table called organisations that contains fileds, 2 being ''id'' and ''name'' these are the fields I need to bring over to the clients _form.rhtml. whats the best way of going about that?? 2 ways i have seen suggested that I cant get to work -@organisations = Organisation.find_all placed this in def new
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
2006 Jul 10
9
ROR questions
Hi, ? I''m a Ruby on Rails newbie.? I''ve been tasked with building our office''s first ROR application, and I am the only one working on it, so I am muddling through with a couple of books...? Moving along slowly but need some discussion time with some people who KNOW it and can maybe offer some answers to questions I haven''t found in my books. ? First - what is
2005 Jul 06
2
Composite Views
Hello: How do you create a composite view? I have a form based on the model "contacts" which consists the following models: - organization - person - address I was going to use partials to create the form; e.g: - organizations/_form.rhtml - people/_form.rhtml .etc ...and render them with the appropriate tag: <%= render_partial ''people/form'', @person %> I
2006 Mar 29
3
partial variable help
Can''t work this out: In list.rhtml: <% for employee in @employees -%> <%= render(:partial => "list_form", :object => employee) %> <% end -%> In _list_form.rhtml (partial): <%= employee.id %> In controller: @employees = Employee.find(:all) I get the following error: undefined local variable or method `employee'' I everything is correct
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a couple days and can''t seem to figure out the correct way to structure my observe_field call. The HTML and Javascript generated all appear correct, but the AJAX call is never made. Below is the code I''m using and any help would be much appreciated. models_controller.rb def
2006 Aug 29
1
Scope problem with form_remote_tag, ajax?
Hi all, I have tracked an odd behavior down to what I think is an issue of scope. In short, when I use form_remote_tag to establish an AJAX form, my database fields don''t get populated when performing an edit on the record. Those same fields will get populated using start_form_tag and no AJAX. I think that Ruby can''t find the local object that represents the database