similar to: Setting @request.env["HTTP_REFERER"] in an integration test

Displaying 20 results from an estimated 200 matches similar to: "Setting @request.env["HTTP_REFERER"] in an integration test"

2007 Feb 22
1
HTTP_REFERER support?
Hello, we want to read the referer URL from the HTTP headers, in order to be able to track where someone is coming from, in a Rails application. As I can see in the source, Mongrel doesn''t even parse the HTTP_REFERER field from HTTP requests. This would make a useful feature, I guess. Apart from that, Mongrel is (IMHO) simply the best solution for deploying Rails - keep on going!
2009 Aug 25
28
Anything but Aptana
Not trying to get into a "What''s a good IDE" here, BUT....On Windows....RadRails never cut it. Under Aptana, it''s a terrible joke, and I''m sick of losing so much time waiting not only for this thing to initialize, but the hanging and crashing I go through is killing me. Please, someone....point me to a decent, lightweight IDE. All i want is syntax coloring.
2006 Jan 30
10
How do I get the the full URL of an incoming request
Hey, Is is possible to get the full URL (''http://www.sender-domain.com/links/list.html'') from where a user was sent to my site (www.my-domain.com/controller/action) e.g. by clicking on a link? (I read about something called a ''request'' object, I don''t know what it is or does, is that what I''m looking for? I''m very new to Rails
2007 Feb 22
4
Modifying Apache Conf To Block Leachers
Howdy, I''m using Apache 2.2 + Mongrel with great success, using the sample configs from the Mongrel site. We have some MP3s on the site and recently someone has been stealing them and basically leaching them from the site, linking to them from an off-site location. I''ve been trying to modify my Apache conf to check the referrer and adjust accordingly as below but no
2012 Oct 02
8
Being strict on differentiating between IEC prefixes and SI prefixes.
One of the greatest things about rails is that it is so standards-compliant, no other framework that I have seen have complied to the HTTP standard (think REST) in such a degree that Rails does. Kudos to you all for that. I think we (Rails community) should follow the line of standards compliance and also take it to the binary prefixes [1], i.e. kilobytes, megabytes, etc. For more than half a
2010 Feb 15
1
possible bug: using assert_recognizes with extras
Hi. I am trying to use the extras hash parameter in assert_recognizes. I am using. assert_recognizes(expected_options, path, extras={}, message=nil) I have something similar to the documentation: assert_recognizes {:controller => ''items'', :action => ''list'', :id => ''1'', :view => ''print''},
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2010 Jul 08
25
Prepared SQL statements
Dear all great developers. I wonder if there is any work being done or thoughts being shared regarding prepared SQL statements. Currently I am in heavy need of tuning SQL INSERTS that insert large (3MB) images into blobs. I am using rails 2.3.5 with postgres adapter and pg driver. Any information would be appreciated. Jarl -- You received this message because you are subscribed to the
2014 Nov 20
9
[Bug 86491] New: Nouveau crash when shutting down
https://bugs.freedesktop.org/show_bug.cgi?id=86491 Bug ID: 86491 Summary: Nouveau crash when shutting down Product: xorg Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Driver/nouveau Assignee: nouveau at
2006 Aug 05
3
Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection?
Hey guys, Ok, basically I coded a ruby on rails CMS to manage a bunch of media files. I am finding that a lot of people are "hot linking" to these media files and would like to prevent this to save bandwidth. Usually in the past, it hasn''t been a problem, I would add something like the following to my .htaccess file RewriteEngine on RewriteCond %{HTTP_REFERER} !^$
2012 Sep 23
2
Find by id in the view template dynamically
Rails 3.1.3 I have a model ''Airline'', whose STRING column is ''company'' only. Also, another model ''Plan'' has an INTEGER column ''airline_id''. I would like to show the ''company'' name (string) in a template like <% @plans.each do |plan| %> Airline: <%=
2007 Feb 18
2
SerializationTypeMismatch in Production Mode
In production mode, I keep getting this error the 2nd time it loads a page with a serialized attribute: ActiveRecord::SerializationTypeMismatch (answers_container was supposed to be a Array, but was a NilClass): /vendor/rails/activerecord/lib/active_record/base.rb:1964:in `unserialize_attribute'' In development, it works fine. In fact, if I set to false config.cache_classes in
2006 Apr 18
6
Best Practice for Returning to Calling Page?
I have a partial, it''s a shopping cart display, it''s designed to appear on several different pages of my site. One of the buttons on the shopping cart empties the cart, and then I want the calling page to redisplay. In other words, the cart controller needs to return the visitor to the same page -- however since the cart could appear on any given page, this has to be
2006 Jul 10
4
Test Mongrel 0.3.13.4 Please
Hey Folks, There''s a nasty little bug in 0.3.13.3 when running in development mode which could cause all sorts of problems. Please grab the pre-release of 0.3.13.4 and tell me if it works for you: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need
2006 Jul 25
11
Prevent users from entering urls
How could I make it so that links on my page could link to a controllers action, but if the user manually entered the url, it would redirect them back to the main page? Is this possible? Thank you, -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2012 Mar 12
4
how to design a api?
hi,everyone. now i start to design a api. the url like this http://localhost:3000/api?seckey=123&&post_id=1 the visitor need a seckey to access auth.and get info via json. so i dont think thats a good api. i need your answers.thx -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a
2006 Mar 09
3
redirect_to :back question
Hi! How to use this? I can declare it only inside a controller, so i tried to do add this to application controller: def back redirect_to :back end so i could call in all my views link_to ''back'', :controller => ''application'', :action => ''back'' but it doesn''t work - there are no errors, but i''m still on the same
2006 Mar 09
4
Stop users accessing methods.
Hello all. Is there a way to stop users from being able to access a controllers methods without affecting the ability of other controllers to use them? i.e FooController def secret #Stuff end end BarController def index redirect_to :controller => ''foo'', action => ''secret'', :id => ''007'' end end But directly
2018 Jan 24
1
Function gutenberg_download in the gutenbergr package
I've been working through https://www.tidytextmining.com/tidytext.html wherein everything worked until I got to this part in section 1.5 > hgwells <- gutenberg_download(c(35, 36, 5230, 159)) Determining mirror for Project Gutenberg from http://www.gutenberg.org/robot/harvest Error in open.connection(con, "rb") : Failed to connect to www.gutenberg.org port 80: Connection