similar to: Take some field out of the tab order in a view

Displaying 20 results from an estimated 50000 matches similar to: "Take some field out of the tab order in a view"

2006 Mar 07
1
setting tab order in a select form field
Hi I''m trying to set the tab order for a select form element. I''m doing it like so: <%= select ''issue'', ''person_name'', people, "tabindex" => 6 %> but it gets ignored and I get this for output: <select id="issue_person_name" name="issue[person_name]"><option
2007 Jan 15
0
Call clients in view of order
I have a view of orders, and I must call a client. How make for want call the client, in event onblur of text_field, to fill the fields on informations of client? As one was in app desktop -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2006 May 04
1
Instance or local vars for field helpers in partial template
I''m getting confused. If I have a view (.rhtml), I can use a field helper like: <%= text_field :mymodel, :attribute %> This uses the value from @mymodel.attribute Now, if I am rendering a template normally (i.e. not partial), I would expect @mymodel to be a model object defined as an instance variable in the controller. However, if I am rendering a partial template, I
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the console, but not from the view. I have the following: # partial schema create_table "users", :force => true do |t| t.string "login", :null => false t.string "first_name" t.string "last_name" t.string "email", :null => false
2010 Jul 08
3
Testing equality
Hello How can I test equality with two objects when they include some attribute that is BigDecimal? if I make something like this: it "should ...whatever" do obj = Factory.create(:my_object) ... MyObject.first.should == obj end. FAILS This fails because the object expected is different from the object gotten, and the only difference are the BigDecimal attributes, that are
2006 Apr 25
2
Noob Question: REgarding Forms ( Take 2 )
I''m hoping there''s an easy way to do this. I''m trying to read options from a database, and insert them into form tags. So for example, In the Database Table: options size: 300 type: text_field maxsize: 300 and I want to create a text_field form tag, with all the appropriate options, is there an easy way to do this, other than having the code output the HTML
2006 Nov 04
0
Using Field Helpers to Edit a Related Model Object
Hello folks, Here''s a question about creating an edit screen for a model and a related model. On page 355 of the AWDWR book (printed page 464 of the 2nd edition pdf), there''s a little table showing how form parameters map to the params object. One of them is: user[address][city]=Wien ... maps to params as ... { :user => { :address => { :city =>
2006 Apr 08
2
ActionView::Helpers::FormHelper instance methods should take an object reference rather than an object_name.
Hi ActionView::Helpers::FormHelper methods (e.g. #text_field, #check_box...) take object_name as an argument. From this argument they infer a name that is supposed to contains the reference to the relevant object. I can''t see why the FormHelper methods were designed that way. Compared to simply passing them a reference, the current way seems too complicated and an invitation to problems
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in the browser. <h1>New member</h1> <%= error_messages_for :member %> <% form_for(:member, :url => members_path) do |f| %> <fieldset> <legend>Member Info</legend> <p><label for="member[first_name]">First Name:</label> <%=
2006 Feb 20
0
How to reference a field of an associated object in a text_field
Hi, I hope someone can help, I am stumped. I have a Registration ActiveRecord object. It records registrations for people for classes. class Registration has_and_belongs_to_many :people has_and_belongs_to_many :scheduled_courses end I have a form that allows someone to register. A registration form will register two people. They fill in their names, addresses, and the classes they
2014 May 05
2
Issues with syslinux_run_command(str) and parameters
> I didn't see any further communication here; would anyone be > against my submitting/proposing a patch for this? Contributions are always welcome. > > I can see two possible approaches. One approach would be to > isolate the restriction on user commands away from > syslinux_run_command / load_kernel. > > Another would perhaps be to add support for a
2006 Mar 18
2
Need help with my view populating rows
Hello, I was talking with someone in IRC, trying to get one form with however many fields to make new rows. He worked with me on the controller, but then I didn''t get the help with the view I needed, and I''ve been trying to do it on my own. I''m uploading pictures to my Pictures table. As you know, I need a few fields for each picture. I''ll need the filename,
2009 Jul 18
2
Sharing controllers/models within a view
Hello, please forgive me if this answer is obvious! I''m new to Rails this week. I have two database tables, and the associated scaffolding, controllers, models and views. The first is service_provider, which holds a list of service providers. The second is service_provider_countries which is a table of countries (obvious perhaps). In views/service_providers/new.html.erb I have a form,
2005 Dec 01
2
View helpers and nested attributes
Hello all, I have a model with two entities (document and asset) and a 1:1 relationship defined between them (every model has an asset). I want to generate a rthml view that generates a hash for document attributes and a nested hash for asset attributes (for example {:document =>{:name=>XXX :asset => {date =>XXX}}) According to the Pragmatic Programmers book (page 355), the input
2008 Aug 26
0
utf-8 encoding problem for text field
hi all, I have a problem concerned with utf-8 encoding and text_field. the text field - <%= text_field :query, :text %> In the text_field I entered keloidales de acné In controller I tried params[:query][:text] for this I get keloidales de acn and é is omitted.. please can anyone give a solution for this thanks and regards Raju -- Posted via http://www.ruby-forum.com/.
2006 Feb 01
4
Custom view helpers
Hi all, I would like to write some custom helpers like the ones available as form helpers text_field, text_area and the like. My first try was this: custom_helper(obj, meth) ''some_string'' + obj.send(meth) + ''some_other_string'' end Object and method are being passed as symbols like this: custom_helper(:person, :name) and Ruby rightfully complains that
2006 Jul 27
2
setting initial text field values in a form
Hi, I am trying to create a basic form in which I want one of the fields initialized before displaying it. My code (in a view) is as follows: <% if ( session[:user_id] != nil ) then logged_in_user = User.find(session[:user_id]) end %> <% form_for :suggestion do |form| %> <label for="suggestion_title">Topic:</label><br/> <%=
2014 May 07
0
Issues with syslinux_run_command(str) and parameters
Op 2014-05-05 om 23:20 schreef Ady: > > > I didn't see any further communication here; would anyone be > > against my submitting/proposing a patch for this? > > Contributions are always welcome. > > > > > I can see two possible approaches. One approach would be to > > isolate the restriction on user commands away from > > syslinux_run_command /
2006 May 22
2
Inserting data in a table with a varchar key field
Hi all, I have some problems inserting data into a legacy table. the key field of this table is a field named CIN which is a varchar(15). when I try insert into this table using a form (generated by the scaffold generator) I get this Error : _____________________________________________________________________ undefined method `CIN_before_type_cast'' for #<Candidat:0x370d8c8> |
2011 Aug 07
3
New field does now show in browser
Hi all I just added a new field phone to form _form.html.erb created with: rails generate migration AddPhoneTotickets phone:string added with rake migraiton and the new field does not show in the browser new <div class="field"> <%= f.label :phone %><br /> <%= f.text_field :phone %> </div> old <p> <%= f.label :phone