similar to: Bizarre problems with AJAX / missing variables

Displaying 14 results from an estimated 14 matches similar to: "Bizarre problems with AJAX / missing variables"

2006 Aug 13
3
ruby and mysql syntax? tried single quotes, double, none, ...
Hi, how do i use passed in arguments and convert those to something sql can understand? do the aliases have to be double qouted? single qouted? i think i tried all but no avail...thanks! def get_count(doctype, towne) @profiles = Profile.count_by_sql("SELECT COUNT(*) from Profiles where Profiles.doctype_id = 1 and town_id = towne") end -- Posted via
2005 Dec 23
10
Extending model
Hi, I''m looking for a way to extend one of my models to allow some level of abstraction between what goes into it and how it is stored. For example, say I have a Product and I want to set it''s price. A person using the website will type the price in euros. Internally, I''d like to store the price as an integer value of cents. I can currently do this with some ugly code
2006 Aug 13
7
you can pass multiple parameters using link_to? anything bad
i just found out i can pass mutiple parameters from views like <%= link_to doctype.name, :action => "show_towns", :id => doctype.name, :id2 => doctype.id%> silly me, i always had the impression that i could only pass 1. i guess i dont have to use sessions after all for my site. is there anything wrong with this? basically instead of the user filling out
2006 Feb 08
1
Weird validation issue
Hi, I''m having a weird validation issue. Validation isn''t working for certain attributes and, for some reason, it''s also affecting things outside of validation. For campers on certain camp types, we require some information about their school. I tried to validate the information this way: validates_presence_of :school_type, :if => Proc.new { |c| !c.booking.nil?
2005 Dec 31
4
observe_field with dynamic forms
I have a form where I dynamically add form elements based on user input. An example is that when a user selects a "server" from a select box I add (via AJAX calls back to server) a "type" select box pre-populated with valid choices for that server. I do this by using observe_field on the "server" field and update a div on the page with the new "type"
2006 Feb 22
2
Removing form observers
Hi, I''m developing a Rails app which uses dynamic forms. To implement these, I''ve used AJAX and Rails''s built-in form observers. Unfortunately, I''m having a problem. This is how the form starts: * Country select box [OBSERVED] (Republic of Ireland selected) * County select box [OBSERVED] (none selected, list of Republic of Irish counties in the drop down)
2006 Aug 04
1
how to count totals for each unique name in a table?
hello, i am having trouble on how to implement this. i have a table of doctor information where each doctor has a town and county field. i would like to create a view that shows the amount of doctor_types in each town. For example if the user selects the ''General Doctors'' search button, a view like this will show up. The next step would be for the user to select which
2005 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
Hi, I''m running round in circles again! I''m trying to save a note that has a HABTM relationship with a job. The note is new - the job exists. In my partial for notes I have ; <%= start_form_tag :action => ''new_note'', :id => @job %> <%= text_area_tag "note", nil, :size => "65x10" %> <%=submit_tag
2008 Jun 09
16
display "..." for text LONER than a certain length...
I am working on an app that has user generated content. What I''d like to do, is display X characters of, say, a title and put "..." for the rest. This sounds like something you see in soc networking type app and wondering if there is some code out there to do this. thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed
2006 Apr 22
6
Friendly Reminder (OT)
Today, I had a tragic hard drive crash. I hadn''t updated anything to SVN in two weeks. I''m posting this here as a reminder to my beloved Rails community. Everyone, right now..... make a backup of your rails work. Make sure its on two disks. Many of you already do that automatically, but just make sure its working. Two near-release rails plugins were lost in the tragic crash
2005 Dec 29
14
Rails 1.0 - Agile book still good?
I''m new to Ruby and RoR but excited to learn what I can do with RoR; I have Pickaxe second edition and want to get "Agile Web Development with Rails" but I''m aware that the book was published some while before RoR version 1.0 was released. Has a lot changed since then, and would I therefore be advised to wait for a second edition of AWDwR? Many thanks in advance
2006 Aug 06
1
creating hash table, how do i? please help
hi, i have a noob question. how do i create a table but add additional fields? for example.. i have a total_table of total, county, and town where total_table inherites county_id and town_id from my town_county table where county_id has_many towns. in my view, id like to go through the hash like this table total_table for total_table.county { print total_table.county print
2005 Dec 31
0
Salted Login Generated code throwing lots of errors
Hi, I''m having a lot of problems while integrating the salted login generator. All of the errors are of the form: "The error occured while evaluating nil.[]" Most seem to be down to evaluating a nested hash, where the first hash is a nil object. For example, @params[''user''][''login''] where @params[''user''] returns the nil
2002 Aug 30
1
confusing name mangling results
Dear sambaphiles, I hope someone can help me understand why I see inconsistent name mangling between Samba and Windows 2000. I am running: LINUX: smbd Version 2.2.1a on linux kernel 2.4.18 MAC: Mac OS 9.1; DAVE version 2.5.2 WINDOWS 2000 PROFESSION (ServicePack 2) According to the O'Reilly book, 'Using Samba', given a file named: antidisestablishmentarianism.txt According to