search for: raw_post

Displaying 20 results from an estimated 42 matches for "raw_post".

Did you mean: raw_cout
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
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...
2005 Nov 27
0
How to get raw_post in functional tests
...nd am using the Paypal gem. The Paypal gem requires the raw POST data, and not the pre-munged version that Rails uses. Running in dev mode, everything works fine, but in the tests, I can't seem to get at the data. I did: class ActionController::TestRequest < AbstractRequest #:nodoc: def raw_post raise "RAW_POST Request" end end but I never see this exception raised ?! Anyone has a tip ? Thanks ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http:/...
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
2006 Sep 19
1
No request.raw_post when using RJS template?
...ion> <option value="1">DJ Yanniv Gold</option> </select> I observate it using the following observator: <%= observe_field(:booking_musician_profile_id, :url => { :action => :update_new_form }) %> Now I have a question: why is there now request.raw_post available? It''s just empty, but I''d like it to store the ID of my selected option! Also params only includes the :controller and :action values... I don''t get it, why is it missing? Everything works fine: the update and stuff is being made, my update_new_form.rjs does...
2009 May 09
0
XMLRPC raw_post getting run through Hash#from_xml
Im trying to create an api, and Im having trouble getting ActionController to not run the raw post data through Hash#from_xml (request.parse_formatted_request_parameters) for the XMLRPC post data. I essentially want it to run through XMLRPC::XMLParser::REXMLStreamParser.new.parseMethodCall(request.raw_post). However, I can''t figure out a clever, clean way to get request.request_parameters to not run since it can run as early as the dispatcher, which will essentially trigger Hash#from_xml on that call before it even gets into the scope of the controller. Anyone experience a problem like thi...
2006 Dec 29
4
Remote API passing in parameter named 'action', routing loses it
I''m working with a remote API that calls a URL in my app, passing in a parameter named action. So the request would look like: http://localhost/my_controller?action=foo Routing correctly interprets the controller action as index. However, it sets params[:action] to index as well. I know that''s how it''s supposed to work...but it means I lose the action parameter
2006 May 04
2
How can I get posted params in correct order?
I''d like to have posted form field data in the same order they were in the form. Raw_post shows the data in correct order but params hash doesn''t. This happens every time (tried it with webrick). Any ideas how to get an array of objects in the correct order? -- Posted via http://www.ruby-forum.com/.
2007 Feb 26
3
POST data not coming through
...st dumps the data, and it came through fine. I read a post somewhere about a similar problem, but it was only occuring over HTTPS. In my case, it is occuring over standard HTTP. I''ve tried using mod_cgi instead of fcgid, and the problem was the same. In addition, I tried checking request.raw_post and it was blank. I also tried submitting the form to the same URL but with "?var=val" appended to it, and params did include "var" => "val". Does anyone have any ideas on what might be causing this? Thanks. -- 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 name[]=[''value1,value2,value3'']. I need to get name[]=[''name1'',''name2'',''name3''] just as if I had submitt...
2006 Jul 27
1
Update second pulldown menu based on first menu selection?
I know I''ve seen this somewhere on this board and just can''t search it anymore. I have three relational tables: clients, projects, and tasks. Currently I''m working on customizing the ''new/edit'' task _form. So far I have it listing clients in a pulldown menu so I can assign the new task to a client. I''d like to have a second pulldown select
2006 Jan 18
5
NOOB Ajax question: handling form input
...ve_field(:wh_config_zip, :frequency => 0.5, :update => :wh_config_zip, :url => {:action => :reszip}) %> In the controller, I put the following method in a public section, def reszip @fixed_zip = request.raw_post[0..4] render(:layout => false) end An then I created an rhtml file in the view section for the controller called reszip.html which contained the following: <%= @fixed_zip %> I put a breakpoint at the start of the reszip method, and I am getting there with the c...
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]) @number_match = @results render(:layout => false) end -- Posted via http://www...
2006 May 23
1
Help with observe_field
...;}) %> <p>Search Results:</p> <div id="search_hits"></div> __Controller: search_controller.rb__ class SearchController < ApplicationController WORDLIST = %w(Rails is a full-stack, really cool, open-source, free thingy!) def search @phrase = request.raw_post || request.query_string matcher = Regexp.new(@phrase) @results = WORDLIST.find_all {|word|word =~ matcher} render(:layout => false) end end __Error: Form is not defined__ __Line error occurs__ new Form.Element.Observer(''search'', 0.25, function(element, valu...
2006 May 25
2
Help: How to write tests for a sms service interface
...''m working on a website that integrates sms services. When someone sends an sms to my service number, the sms provider posts an xml doc to an url specified by me. I have implemented the processing method like this: <code> def process_notification xml = XmlSimple.xml_in(@request.raw_post, ''ForceArray'' => false) @params.merge! xml sms_request = SmsboxRequest.new(:phonenumber => @params["sender"], :operator => @params["operator"], :service => @params["...
2006 May 31
0
acts_as_blog
...====================== ## example of posts model class Post < ActiveRecord::Base acts_as_blog ## before we save, we need to transform the markup into html before_save :transform_post has_many :comments # we need to keep the posts table in good shape! validates_presence_of :date, :raw_post, :title, :category, :description ## transform the text into valid html def transform_post self.post = Post.convert_to_html(self.raw_post, ''textile'') end ==================================================================== #Here is an example of the comments model. cla...
2006 Apr 06
0
3 doubts on observe_field
...;label for="city_state_id">Estado</label><br/></p> <div id="select_state"></div> . . . ==== city_controller.rb *** QUESTION 3: How I can receive the value from @form_country_id for parameter? Not to need to use request.raw_post... def ajax_states_from_country @states = State.find(:all, :order => "nome", :conditions => ["country_id = ?", request.raw_post]) render(:layout => false) end ==== ajax_states_from_country.rhtml ... and not to use @form_country_id variable from _form.rhtml. &l...
2006 Mar 13
2
Can Rails handle PUT requests??
Can rails handle PUT requests with Apache 1.3 and FCGI? If not, what would have to be done to make it work? I would like to be able allow ruby to handle file uploads with resume-able abilities. Thanks
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 I''ve included require '&...
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? Thank...