similar to: ''Has Many'' in one View form?

Displaying 20 results from an estimated 20000 matches similar to: "''Has Many'' in one View form?"

2006 Jan 23
4
ActionRecord: how to update many records in one statement
Hello, I am trying to edit and update all records of table ?intersts? (id, name, description) on one page and has no good idea how to do it right, when updating one record per page it?s ok The question is: what statement instead Interest.update_all(params[:interest]) in controller need to use to successfully update the database table by data passing to controller in parameter ?interest??
2007 May 01
3
How to get TinyMCE editor value( text content)
Hi everybody ! I included one tinymce editor in my rails application. But I cant get the textarea content from the tiny editor. I dont know how to include the submit button . And also I wrote a javascript for getting the textarea content when the user press the enter button. Its also not working. Why it is. tinyMCE.init({ mode : "textareas", }); <textarea name="msg"
2006 Jul 19
0
Form helpers produce invalid XHTML code!
Hi all The following scaffold creation form code... <%= start_form_tag :action => ''create'' %> <%= render :partial => ''form'' %> <%= submit_tag "Create" %> <%= end_form_tag %> ...creates this HTML colde: <form action="/en/bookings/create" method="post"> <!--[form:artist]-->
2012 May 11
1
plot: many bars with wide bars
Hello, I have got another problem. I wrote a function which is able to create plots with different numbers of bars. In order to give them a similar look I determined the width of the bars using the parameters width=0.59 AND ylim=c(0,10)) (see function below) Now, this only works if I have just got up to 6 double bars. In the following example it doesn't work because the bars for the
2006 Mar 10
4
Problem with ajax and textareas on firefox but works on IE
Hi folks, I''ve been trying to figure this one out for a few hours now and can''t seem to understand what I might be doing wrong here. Basically, I have a textarea which has a little icon next to it which will fire off a reset of the original comment if pressed. It works under IE so that when the user types some garbase in to the textarea, and clicks the icon, the contents
2006 Apr 07
1
Formatting form tags for children of parrent data?
This my first Rails project. All my previous work was done it Perl, so I may be missing the Ruby/Rails obvious here. The site I''m working on needs to display archived programs. Some of the programs have multiple versions, all belonging to the same listing. As such, I''ve set-up an extra_files table related to the archive list. Displaying the extra files was trivial. However,
2011 Mar 09
1
Javascript call from view.
Hello All, I am working on a Microblogging application.(majorly written in Ruby on Rails).(the application is similar to twitter) .There is a timeline showing messages by the logged-in user and his/her followers. Each message has a reply link which has been coded as follows <%=link_to "Reply" ,{},:href=>"#",:class => "replyMessage noBackgroundImage" ,:title
2006 Jun 06
1
Getting value of form using Ajax (and problems with Safari)
I have got two forms, the first is a textarea plus a link that activates some javascript to change the form, the second activates some javascript on the onchange event which changes it into a textarea form. This works in Firefox, but not in Safari. Also, I need the value which is selected. I''ve found an example that gives the parameter to the javascript, like this: <input
2008 Oct 05
2
create contact form
Hi all I have a regular HTML form that I want to convert into a RoR form Because I do not need to save the data in the database I think I need: - a controller and a viewer - send submitted fields through email <h2>Contact Form</h2> <form action="contact.html"> <fieldset> <legend>Please send your message: </legend>
2005 Dec 23
3
RE: Scriptaculous and Prototype based Rich TextEditor
What I have so far. In my main HTML: <script type="text/javascript" src="/javascripts/tiny_mce/tiny_mce_src.js"></script> <script type="text/javascript"> tinyMCE.init({ mode: "textareas", theme: ''advanced'', theme_advanced_toolbar_location: ''top'' }); ... </script> My Ajax form
2006 Aug 01
0
checking form submission
I''m working on a rails app where some of the content is located in "static" rhtml files. How should I access form parameters in these files so that something like the following will work(simply checking whether a form has been submitted): <% require ''cgi'' cgi = CGI.new if cgi[''myquery_input_submit''] == ''1'' test = 1
2006 Jun 06
0
Get value from form using rjs, and problem with Safari
Hi, I have got two forms, the first is a textarea plus a link that activates some javascript to change the form, the second activates some javascript on the onchange event which changes it into a textarea form. This works in Firefox, but not in Safari. Also, I need the value which is selected. I''ve found an example that gives the parameter to the javascript, like this: <input
2006 Apr 12
1
link_to_remote with form values?
Hi, I need a way to read a form field and pass its contents as a parameter to a link_to_remote call. So let''s say I have a textarea input: <%= text_area ''course'', ''topics'', :rows => 6, :cols => 60 %> and later a link_to_remote: <%= link_to_remote("Hide", { :update => ''my div'',
2006 Apr 18
4
IN-PLACE FORM EDITING
Ive been following the rails recipes (great book) and wanted to have a larger a text field when editing in place. The chapter it mentions that I can "force the InPlaceEditor to create either a text ?eld or a <textarea> ?eld, using the :rows option to in_place_editor_?eld( ). Then any value greater than 1 will tell InPlaceEditor to generate a <textarea>." It
2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
Hello all! I''m having a problem which is driving me insane. It''s probably related to the fact that I''m new to javascript.... :) Here''s the thing, I have a couple of effects which are all being put in the queue. Some of these effects have callbacks; e.g. "afterFinish". But the calback is being made directly instead of after the effect is done. The
2005 Aug 01
2
disable ''tab'' key wish for incremental autocomplete of textareas
I''m absolutely in love with the incremental autocomplete feature in the new scriptaculous. My one wish would be for some way of disabling the TAB key to prevent users from being able to tab out of an autocompleting textarea. (If they''re using TAB to select the autocomplete choice they end up tabbing straight out of the input field if autocomplete doesn''t find any
2005 Mar 31
5
Outputting XHTML strict
I''m trying to get a page to validate as XHTML Strict, and I''ve gotten everything fixed except for one <textarea> that Rails is generating. <textarea cols="40" id="estcomment_comment" name="estcomment[comment]" rows="10" wrap="virtual"></textarea> This tag is being called in my view with <%=
2006 Jan 19
5
TIP: Using field_error_proc to add style attributes to form elements
I just put this up on the wiki, and thought I''d share in case it''s useful to anyone else. This is handy if you don?t want to wrap your input elements inside a div when an error occurs, but instead want to add some sort of CSS style to fields with errors: ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| msg = instance.error_message error_style =
2011 Mar 03
6
Show a value in view
Hello All, I am working on a microblogging application.(similar to twitter) In my controller there is a method called replypopUp.It is a method that runs when the reply link on timeline is clicked.When I a click on the link a pop-up appears in which there is a text area and a post button.Inside the text area,the name of the user to whom I am replying should appear in the form
2005 Aug 02
4
Fwd: Re: disable ''tab'' key wish for incremental autocomplete of textareas
Hi Tim, Thanks for the commentary, you bring a good point to light: I think the asynchronous nature of AJAX needs to be looked at more carefully in our UI assumptions. The key difference between AJAX auto-complete and any other browser/OS autocomplete is that we can''t guarantee having the results ready by the time the user wants to hit TAB. In the old days we used to have everything