similar to: How can I get posted params in correct order?

Displaying 20 results from an estimated 7000 matches similar to: "How can I get posted params in correct order?"

2006 May 31
4
Add 2 Records with Migrations. No errors. No new records.
I have created the following migrationg by using: "ruby script/generate migration AddFirst" But when I run: "rake migrate" it doesn''t add these two records. I don''t get any errors. The schema_info table is created and schema.rb is updated with ":version => 1". Can I not create records this way? When I load up script/console and put in the same
2006 May 15
5
Finding out the file attributes in FileColumn models
Is there a way to find out the attributes that have been passed to file_column in models? I''ve looked through the source and it seems that the file_column methods are generated at runtime but there''s actually no class or instance variable that hold the file attribute. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jul 09
2
setting request.raw_post with rspec-rails
... is there a way to do this? We have some REST-ish POSTs we''d like to spec out. In the controller this gets accessed with request.raw_post.to_s, is there a way to set this with rspec? Thanks as always, Francis
2007 Feb 26
3
POST data not coming through
I developed an application using Rails and the WeBrick, and now I''ve moved it to the production server using apache/fcgid. Now, however, post data is not being populated in the params hash. Even a simple form with one hidden field, which works fine as a GET request, does not work using POST. The problem isn''t with the form, as I''ve posted the data to a simple php
2006 Mar 19
1
Sending post request with post_form
Basically I have a controller with this: @lang = params[''lang''] || ''en'' @errors = request.raw_post @feed_stats = Net::HTTP.post_form(URI.parse("http://www.google.com/tbproxy/spell?lang=" + @lang), @errors) render :text => @feed_stats However whenever I run this I get an error message: undefined method `post_form'' for Net::HTTP:Class
2006 Feb 11
1
How to POST raw data?
Hi, I know that ActionController::AbstractRequest provides a raw_post method that reads the data that has been posted to the HTTP server as raw data. I am trying to create a rails application that POSTs raw XML data to a web page that reads raw data. I would like to know how to POST raw data to an HTTP server using Ruby on Rails. Can you help me with this? Thanks, Yash -- Posted via
2006 Mar 05
1
post params
How can I access all the post request to a given controller, regardless of the parameters. For example would I use @allparams = params[] -- Posted via http://www.ruby-forum.com/.
2006 Jul 21
4
observe_field submit behavior
I am using observe_field on a number of multi-selects and checkbox form elements whose values would normally come in as arrays on a normal (non-Ajax) form post. I understand that by using the :with => ''name'' I will get name=value in the request.raw_post however if the field I am submitting has mutliple values and the name is of the form ''name[]'', I get
2006 Jun 07
5
little Live search problem
Works fine but when you use backspace or delete on the search word and it hits 0 characters it displays ALL the Test names in the database! def live_search @phrase = request.raw_post || request.query_string a1 = "%" a2 = "%" @searchphrase = a1 + @phrase + a2 @results = Test.find(:all, :conditions => [ "test_name LIKE ?", @searchphrase])
2006 May 23
1
Help with observe_field
Folks, When I use observe_field, I get a javascript error "Form is not defined". Any thoughts? __View: search.rhtml__ <label for="search">Search:</label> <%= text_field_tag :search %> <%= observe_field(:search, :frequency => 0.25, :update => :search_hits, :url => { :action =>
2006 Jan 18
5
NOOB Ajax question: handling form input
Hi, I was trying to modify how a standard edit form works so I could use Ajax to truncate a zip code field which became too long as the user is entering the value. The form was generated by the generate scaffold script. The form is filled with default data taken from the current record. I coded the following changes to a field in the _form.rhtml file: <%= text_field
2007 Oct 15
9
POST with huge HTTP body
Hi, I found the following page describing how to stream data from the server to the client: http://api.rubyonrails.com/classes/ActionController/Streaming.html I want to do the opposite, streaming data from the client to the server, letting the controller saving the data while it''s being received. In particular, I want to upload large files to the RailsDav
2005 Dec 23
2
Bizarre problems with AJAX / missing variables
I''m having some really weird problems with an app I''m writing. Everything is working as expected on my development machine (OSX, Rails 0.14.4) but is cacking out with weird errors on the Textdrive demo site (FreeBSD, Rails 1.0.0). It complains about missing variables, with errors like this: undefined local variable or method `rawcode'' for
2006 Jun 26
6
paypal ipn from leetsoft
Has anyone had any luck with the paypal gem from leetsoft (Tobias Luetke)? I''m successfully sending off and making payments, but the ipn doesn''t send back to my site. I have the notify_url set in the form, have a action set for the ipn postbacks, but all I get from my sandbox after payment is a "view shops" page from paypal after payment is made. -- Posted via
2008 Sep 25
2
Two overlaid density plots - Does order matter?
In the following code, the only difference between the two plots is the order the variables are plotted. In this case, the plot of "cdata.den" in plot #1 is different from its plot in #2. Specifically, "cdata.den" spans the x-axis from -5 to 30 in plot #1 and from 0 to 20 in plot #2. Does anyone understand why these two plots do not yield the same result? #Make density
2011 Aug 29
1
Legend / bar order - ggplot2
Hi all, I am trying to do a barplot in ggplot2 and want to make sure that the legend order is consistent with the bar order, that is the legend order is orig and match; and the bars are ordered in the same way. It seems to me that I can only control one of them. Any idea? library(ggplot2) df <- data.frame(value = rnorm(20), name = factor(rep(letters[1:10], 2), levels =
2009 Feb 27
1
levelplot help needed
Hi there, I'm looking for someone who can give me some hints how to make a nice levelplot. As an example, I have the following code: # create some example data # -------------------------------------- xl <- 4 yl <- 10 my.data <- sapply(1:xl, FUN = function(x) { rnorm( yl, mean = x) }) x_label <- rep(c("X Label 1", "X Label 2", "X Label 3", "X
2009 May 22
2
Scope problem?
I've just spent today trying to fix a Heisenbug... this function returns a linear interpolator function: interpOne <- function(xl,yl){ f = function(data){ t = (data-min(xl))/(max(xl)-min(xl)) return(min(yl)+t*(max(yl)-min(yl))) } return(f) } > k=interpOne(c(0,1),c(4,5)) > k(0.5) [1] 4.5 and this function uses the above to return a function that returns a piece-wise
2009 Apr 28
1
colored PCA biplot
Hi- I'm trying to make my PCA (princomp) colored. In my csv excel sheet, I have the first column numbered according to the groupings I want to assign to the PCA. I've played around with trying to set this first column as the color vector, but haven't had any luck. Any suggestions? Thanks, Hillary [[alternative HTML version deleted]]
2009 May 27
0
request.raw_post into Tempfile
i have flash application ,which will give a jpg file as raw_post from that raw_post i am trying to store into a tempfile tempfile=Tempfile.new("myfile.jpg") tempfile.write(request.raw_post) but always "tempfile.read" giving ""(not storing the data) as output i don''t why ? any help ? -- Posted via http://www.ruby-forum.com/.