similar to: Form field naming semantics question

Displaying 20 results from an estimated 1000 matches similar to: "Form field naming semantics question"

2006 Mar 21
13
"Remembering" link to redirect to after logging in
Hi, Suppose I have a resource such as http://localhost:3000/topsecret/data that requires the user to login first. What I did was make use of before_filter to check and see if the session variable is set with the logged in user''s id (similar to the example in "Agile Web Development with Rails"). However while the filtering function does work correctly in redirecting the
2006 Jan 12
1
Form Entity Names for Child Objects
In my controller, I do this to instantiate and populate my Part, PartName and PartNumber objects. def edit @part = Part.find(params[:id], :include => [:part_name, :part_number]) end But in the view, this doesn''t refer to the right object. I somehow need to indicate that the part_name object is a child of the part object. <%= text_field_with_auto_complete :part_name,
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2006 Feb 04
1
Error when using form helper and child objects
Hi, This is one problem that has gotten me stumped for quite a while. I have an Item that has_many :DeliveryMethod, and what I seek to achieve is to create a form that''d let me create an Item, as well as its DeliveryMethods in 1 single form. And so I tried something like: <%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod ?
2006 Jan 17
2
Instant Rails request lags >4 sec
Hello RoR folks, I am using Instant Rails and a small app that currently uses scaffolding for CRUD on just one table with 7 attributes. I am not shure wether scaffolding slows down the app that much but I have a time lag for every request with above 4 sec. The preinstalled apps like Type are running damn fast, which is not the case for my stuff. Any help on this would be great Thanks, RTG --
2020 Oct 27
2
Creating unique code
Hello, I need some help in creating a new variable. I need to create a 'couple identifier', which gives a unique code for every couple/triple/... in a household. So, I can identify couples. To do this, I should use 4 variables: * SERIAL = a unique numeric code for each household * PERNUM = a unique numeric code for each person * SPLOC = the numeric code of the spouse in the
2005 Jul 14
1
Single-table inheritance and eager loading
I have a people table with four types of people: clients, spouses, children, and others all setup using single-table inheritance with a foreign key back to a household record. A Household has_one client and spouse, and has_many children and others. I want to use a single "Household.find(@session [:household_id], :include => [:client, :spouse, :children, :others])"
2004 Sep 06
2
spouse-friendly spa-3000 pstn interface
This post is simply documenting a spouse-friendly way of using the spa-3000 as both a fxs and fxo port for basic soho environments in the US, allowing asterisk to participate as needed/wanted. All home phones are connected _only_ to the spa-3000 fxs port. The incoming home pstn line is connected _only_ to the spa-3000 fxo port. Defined Line 1 (fxs) to register with asterisk via sip (extn
2006 Mar 23
1
Implementing a model with logging?
Hi, I''ve been trying to work out a model (let''s say a StudentRecord) which has a number of attributes, and the key thing I''m trying to do here is to implement it such that you can actually view modifications made over time by various users (think of it as a wikipedia style of logging). Is there some provision in rails that''d provide this functionality for
2006 Mar 24
1
Modifying a session variable from a different process?
Hi, I''ve implemented a log in session "thing" that essentially works by holding the model of the logged in user in a session variable, like this: session[:user] = user However let''s say at this point in time, should an administrator of the system decide to revoke this user''s account, the session variable for that currently logged in user is still valid,
2006 Jan 12
1
Does rails support method overloading?
I''ve tried to have 2 methods of the same name (but with different parameter signatures) and it always seems like the later declaration tends to win out, does this mean that ruby does not support overloading? If so what aboutt the .new method? You can either call it as .new (with nothing) or .new(hash variable). Is it possible to override a specific instance of the zero parameter
2006 Jan 14
2
Why can''t I changed the _session_id cookie?
Hi, I noticed that there is a cookie set by my rails scaffold that contains a 32 character hash code in it, but when I tried to change its value using Cookies[:_session_id], nothing happened, it stays the same! How am I supposed to change the session_id? Thanks. -- Posted via http://www.ruby-forum.com/.
2004 Aug 11
3
X100P outbound only (Don't answer)
I tried implementing my * and it didn't pass the spouse factor at this time. I wanted to hook it up for outbound only at this point to get a better handle on the dial plans and the echo problem. I thought this might have been done before as a natural part of testing - but maybe not. In wcfxo.c I found this: if (!wc->offhook && !wc->ringdebounce) { if
2008 Feb 20
1
text_field_tag - different parameter name
Hi, I have one problem with validation I am creating e-shop and I have products. This view look like this: <% for product in @category.products %> <div class="produktyBox"> <%= product.title %><br /> Price: <br /> <div style="color:red; font-size:large; font-weight:bold; margin- bottom:5px"><%=
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 Oct 20
2
Dataset on Baltimore home energy costs
I received a private request for my complete dataset from my previous questions. In gratitude to the developers of R, and especially to the helpful members of r-help, I'm happy to attach it. Anyone is free to use this dataset in any manner they wish, including published books. Attribution is not required, or even desired. Explanatory notes on dataset: This data is collected from monthly
2006 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to http://curentpage/?filter=searchtext (the filtering code is already written) it would look like this: <%= start_form_tag(url_for_options = {<something>}) %> <%=text_field (<my_filter>) %> <%= submit_tag(value = "Search")%> any idea how to do this? thanx in advance
2006 Oct 29
1
Multiple dial macros at the same time
I am setting up an after-hours on-call system. Someone calls in and requests service, and while they listen to music on hold, we dial out to several people's cell phones and home phones. We don't know if they will be answered by the employee, or by voicemail or a spouse/relative/child/pet. So we play a message that says "press 1 to accept the call" and ask employees to train
2009 Oct 21
3
Low End NAS hardware.
Hey, The recent discussion on NAS/SAN and the Thecus N8800 got me to thinking. Bit of background. I have an old Dual Athlon MP2800+ that I'm using for a home web/file server. It runs fine but between the noise of the various fans and it's location in the living room, I've been asked by my spouse to find a replacement for it that's smaller & quieter. Looking at the Thecus, and
2019 Apr 15
2
cutting corners (4.10.2 on el7.6)
Hi All, I'm not well versed in the samba code base so I'm asking here.. :) I only wanted to run a small AD/DC for my SOHO (1 spouse, 3 kids, 1 dog & 1 cat). I've managed to build 4.10.2 on rhel7.6 with gnutls-3.3.29 and python-2.7. (this required an updated cmocka, which in turn required an updated cmake) but... building without testsuite and without clustering (ctdb) allows