similar to: Smart html output for an object?

Displaying 20 results from an estimated 600 matches similar to: "Smart html output for an object?"

2006 Jan 18
22
Creating multiple child objects from the same form
I''ve been digging into rails, but this one question has been a two day stumper. I''ve got a question/answer model that I''m trying to work out. Each question has multiple answers (they''re more like choices, it doesn''t matter whether they''re right or wrong), and I''d like to have the question creation form also have multiple fields in
2006 Mar 17
5
Radio Button Validation
I''m writing a quiz application and I need to validate the radio button reponses. I do not have the questions in a database, I just have forms which contain "question1" and then I strip out the "question" portion and just insert the number as the question''s id. So now I''m faced with the dilemma of making sure the radio buttons are pressed. Radio
2001 Nov 27
2
winbind trouble, maybe PDC too.
A quick preamble. SAMBA 2.2.2, Redhat 6.2, Mandrake 8.1 Windows NT4.0sp6a PDC Here is an excerpt from my winbind log. Sending a packet of len 50 to (192.168.1.255) on port 137 Received a packet of len 62 from (192.168.1.20) port 137 nmb packet from 192.168.1.20(137) header: id=5433 opcode=Query(0) response=Yes header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=Yes header:
2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
Hi, I''ve been trying to find an answer for this problem in the last couple hours, but I think no discussion was about this exact same thing. So here it goes, hope someone can help. I''m trying to spec a view which works correctly on the browser, but that generates the following error when I run "rake spec:views". ActionView::TemplateError in ''/survey/show
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
2006 Jan 19
8
Passing variables across forms
I''ve been reading my Agile Dev book over and over again, but I can''t wrap my head around how to do this. There''s a question and answer portion site of my site. You begin the process by adding a question to the database. After that, the program should redirect you straight to adding an answer for that question. The problem is, I don''t know how to keep
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 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 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,},
2006 Mar 29
4
Collecting data from forms
Hi, I?m having some problems collecting the content of some forms. This is whats in list.rhtml: <%= form_tag :action => ''send_message'' %> From: <%= text_field ''message'', ''from''%> <br>Message: <%= text_area ''message'', ''text'', :rows => 6 %> <tr> <td></td>