similar to: Creating multiple child objects from the same form

Displaying 20 results from an estimated 3000 matches similar to: "Creating multiple child objects from the same form"

2002 Apr 22
3
no output from perl script
Here is the first Perl script I've tried to write to run rsync. It seems to work, but I don't see the progress like I should. I apologize if it's sloppy, I should add that it's not only the first perl script I've written for rsync, it's the first perl script I've written at all. ___________________________ #!/usr/bin/perl -w print " This command will DELETE
2009 Apr 24
1
deleting rows provisionally
I have an object. I think it is a matrix, called 'answer2' str(answer2) int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" "abdomen.2" ... ..$ : chr [1:2] "row" "col" I want to delete rows that have the same entries.
2006 Jun 02
4
Creating an array of params
I''ve got a bunch of text fields that I''d like to access as an array. The code looks like this: <%= text_field_tag "people[0][entry]" %> <%= text_field_tag "people[1][entry]" %> <%= text_field_tag "people[2][entry]" %> So when I submit the form, I''d like to be able to use it like params[:people].each {|p| p[:entry]}
2006 Oct 12
9
Newbie question: 28000+ files for 25000+ records?
Hi Obviously my question is, is that normal? To have so many files? I was indexing 6 string fields from 25000+ model records (all of the same model). The index appears to be working. I guess I was expecting a few hundred files after optimzing, not more files that records indexed. Please understand I am brand spanking new to Lucene, Ferret, and AaF. I was using acts_as_ferret with :fields
2006 Sep 15
7
OT: TinyMCE in Rails
I''m having a problem getting the text area the size I want it to be. In my view at the top I have this init calls <script type="text/javascript" > tinyMCE.init({ mode: "textareas", theme: ''advanced'', theme_advanced_toolbar_location: ''top'' }); </script> Then in my form: <%= text_area
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function text_area. I ''ve tried using value = "....." to do this but with no luck. Could some one please answer my simple question? Thanks. Dan. -- Posted via http://www.ruby-forum.com/.
2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app. I''m running into issues with forms however. If I use form_for the output of the form gets swallowed. For example: form_for :article, @article do |f| f.text_field :title f.check_box :published f.text_area :description f.text_field :pub_date f.text_area :content end gets rendered as an empty form
2006 Jan 22
3
Formatting input/output of a text box
Hello, What''s the best way to handle formating of a text_area? I have a text_area in my rails app where people can leave comments and I''d like to automatically convert the line breaks into <br /> tags, or just simply wrap a whole paragraph in <p></p> tags. I''m currently doing the following in my comments controller to insert line breaks when the user
2008 Apr 06
10
about the form_for ..
question one: is there any select box tag for form_for? now,perhaps i just can use the select or select_tag? question tow: i have a A model,it has one B such as: class A< ActiveRecord::Base belongs_to :B when i use the form_for tag,how can i output the variable name?like this: <%form_for :a,@a,:url=>{:controller=>"a",:action=>"save"} do |f|%>
2006 Jan 17
6
An object that initializes multiple objects?
Hi, Something that I have noticed is that every class that inherits from ActiveRecord::Base has a database table of its own. However what if I don''t want a class to have its own table, but to actually serve as a proxy to initialize other entries? For instance as an example, let''s have a form with the fields for "student name", "student id number",
2006 Apr 12
4
Binding Text Field/Areas to Array?
Hi, If I have @answers in my Controller, which is an array of Answer model objects which don''t exist in the DB yet... How do I bind a text_area helper in the View to each Answer? (I''m pre-filling some of the Answers with other data people need to verify before submitting and will insert on POST.) I''ve been able to get the textareas to render but not with the
2007 Aug 17
3
Clear text_area value onfocus
Hi! I have a "text_area" that looks like this... <%= text_area ''business'', ''otherDigitalDesc'', "cols" => 25, "rows" => 4, "value" => "Enter Description if Yes..." %> Right now, if I submit it, it adds "Enter Description if Yes" into the database. It would be nice to not have it enter
2006 Jul 04
1
Smart html output for an object?
Hi, I''m trying to make it so that an object can be easily printed into the html format I want. I''ve been focusing on using a case/when control structure, so let me start by showing you some code... I was trying to use this following code as a helper method, def print_question(question) @question = question case @question.question_type.code when
2006 Apr 06
2
text_area and :value
I''m trying to use the text_area() method and would like to populate the text block with initial text. According to this: http://dev.rubyonrails.org/ticket/3752 there was a fix put in place, but I''m ont sure how to integrate this. How do I get the :value parameter to show up within the textbloc instead of the html attributes? -- Posted via http://www.ruby-forum.com/.
2006 Apr 26
7
Not updating
I copied the scaffolding edit and update and made it like this, Note: awnser is edit. Admin_contoller.rb def awnser @question = Question.find(params[:id]) end def update @question = Question.find(params[:id]) if @question.update_attributes(params[:question]) flash[:notice] = ''Question was successfully updated.'' redirect_to :action => ''list''
2013 Mar 13
2
Form_for text_area
Hi all, Since I am new to ruby on rails. I''m stuck in some minor issue. I am using form_for in my view. In that I am using a text text. So, My question is, how to add a default value to the text_area along with the row and col values. Please help me out ASAP. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2006 Apr 17
1
can we take two argument in params
hi everybody i made two tables 1)bestandslistes and 2)verkaufslistes i have one form given below***** Hersteller Kaufmann Typ KundenName ''customer'' %> VK Datum now in controller i made this code for insert a value in verkaufslistes table***** @verkaufslistes = Verkaufsliste.new(params[:bestandsliste]) if @verkaufslistes.save redirect_to
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi, I''ve looked on api.rubyonrails.org but I''ve not found how to add to a date_select(object, method, options = {}) a class option to set the class of all the select tags. I''ve tried using "class" => "myclass" in thoose ways: <%= date_select("costo", "data", "class" => "testo" ) %> <%=
2009 Oct 22
19
undefined method `stringify_keys!' for "":String
i have an error undefined method `stringify_keys!'' for "":String my view is given below <%= form_tag :action => ''resolve_create'', :resolve => @resolve %> <p>resolution:<br /> <%= text_area ''resolve'',''content'', :cols => 40, :rows => 12 %></p> <%= submit_tag
2006 Jun 21
5
Problem with observe_field
Hi folks, I have following in my view : =================== <div class="foo"> <%= select ''theme'', "id", Theme.find_all.collect {|t| [ t.name, t.id ] }, { :prompt => ''Select a theme'' } %> </div> <%= observe_field( :theme_id, :update => :my_style, :url => { :action => :themelookup, :id => @space,},