Displaying 20 results from an estimated 8000 matches similar to: "Routing Error if using ssl_required"
2007 Dec 04
1
ssl_required being ignored?
Hi everyone! I want to require SSL for a single action in one of my
controllers (for logging in, and sending a password).
Working off of the skateboard book, I have added:
include SslRequirement
to my application controller, and then in the login controller, I have
added the line:
ssl_required :login
This does not give me any errors, but it does not redirect me to https
either. It simply acts
2008 Jun 12
2
SslRequirement Problem
Hello everyone,
I''m pretty new to the RoR''s thing and am having a problem setting up
SslRequirement plugin.
I have installed the SslRequirement plugin and added it to my
application_controller.rb with include SslRequirement
However, when I try and do "ssl_required :process_payment"
I get the following error:
undefined method `ssl_required'' for
2006 Jan 23
1
ssl_requirement plugin: how do I override ssl_required?
The ssl_requirement plugin indicates that I can override the
ssl_required? method. I want to use this facility to ignore the ssl
requirement declarations when RAILS_ENV is anything other than
''production''.
My question is, where do I override this?
The relevant readme is:
http://dev.rubyonrails.org/browser/plugins/ssl_requirement/README
Also, does this plugin work with a
2006 Mar 30
4
SSL Requirement plugin
Is there any way to have the plugin require SSL to be used for all
actions in a controller and just specify the ones you dont want to
require SSL using ssl_allowed?
class ApplicationController < ActiveRecord::Base
include SslRequirement
ssl_required *.*
Many thanks.
Also I could of course combine this with local.request? so that when
developing locally http is allowed, but
2007 Oct 13
3
Endless Redirects with Ssl_Requirement
I''m running an application on mongrel with apache 2.2.3. SSL works
fine when I enter an https manually. But when I use the plugin, I get
an endless redirect.
Got the same error when I tried running the following simplified
version of SslRequirement from within an action:
unless request.ssl?
redirect_to "https://#{request.host}/#{request.uri}"
end
So there must be a
2009 Oct 18
4
NoMethodError in User sessionsController#new
I''m setting up authentication with Authlogic and I get this error.
I''ve done some searching but with no success. I tried setting the
current_user method in Application_controller to protected and not
private, on the recommendation in Stack Overflow.
Error in browser-----------------
NoMethodError in User sessionsController#new
undefined method `require_no_user'' for
2007 Jan 23
2
SslRequirements plugin and mocha
Hi. I''m loving mocha but have ran into a problem with using the mocha
plugin with a project that has the SslRequirement plugin. It seems
there is some conflict between the two? Any ideas?
$ ruby test/functional/calendar_controller_test.rb
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:478:in
`const_missing'': uninitialized constant
2011 Mar 26
2
Rails 3 + SSL
After reading tons of posts about buying certs, etc, I''m still
confused. Please point me in the right direction. Here''s the
question:
I have a rails3 site (www.mysite.com). I want to have some pages use
ssl, and some not. It appears the require_ssl approach is pre-Rails3
and there are other alternatives. Most of the posts I read talk about
using a diff domain for ssl
2010 Jul 05
1
[PATCH] gettext initiation problem Thanks to Thibault Deloffre <tdeloffre@linagora.com>
From: root <root at ovirt.admin.virt.par.lng>
Signed-off-by: root <root at ovirt.admin.virt.par.lng>
---
src/app/controllers/application_controller.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 4c4666e..c7f8431 100644
---
2009 Sep 10
1
undefined method `protect_against_forgery?'
When I use plugin ''railstree'' (http://www.hashcode.eti.br/?p=91) as
following code:
node = Node.new :label => menu_item.name,
:link_to_remote => {
:base => self,
:update =>
"container",
:url => {
2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
src/app/controllers/application_controller.rb | 2 +-
src/config/environment.rb | 2 +-
src/config/initializers/new_rails_defaults.rb | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
2008 Feb 22
7
Testing misc methods in ApplicationController
I''m already successfully testing before_filters in application_controller
courtesy of this blog post:
http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller
However, i can;''t work out how to test the sort of method that is added to
application_controller so that all controllers can use it. It must be
something simple that i''m doing
2007 Dec 03
2
before_filter application => exclude some other controllers
Hello again,
It''s possible to use before_filter in the application_controller, and
exclude for some methods from other controllers ?
i have a before_filter in application_controller that checks if the user
is logged, if the time hasn''t expired, ... and I want to exclude some
methods of this check, like the login. This ''login'' belongs to other
controller.
I
2008 Feb 24
3
params checking in controller before real action
I want to perform certain action in controller based on request
parameters. Is there some way to access params in controller before a
real action? Like in following code:
class UsersController < ApplicationController
# params[:type] in here does not work
ssl_required :create if params[:type]=="something"
def create
# params[:type] works in here.
end
end
If not,
2009 Jan 22
0
script/plugin and polluted(?) sources
I recently had trouble installing the ssl_requirement plugin.
script/plugin said it couldn''t find ssl_requirement.
I "solved" this by running "script/plugin discover" and accepting the
addition of a bunch of other repositories. The script could then
discover and install ssl_requirement.
BUT: It wasn''t the same version of ssl_requirement that I''d
2010 Feb 09
4
Rails3 pre and protect_from_forgery
I''ve almost entirely converted a rails 2.3.5 app to 3pre. I''m having
some trouble with protect_from_forgery. I had protect_from_forgery set
in application_controller.rb, but run some uploadify ajax stuff in one
of my controllers, where I had protect_from_forgery, :except
=> :add_file set.
In rails 3 I''m getting ActionController::InvalidAuthenticityToken on
the ajax
2006 Aug 08
1
Suggestion: environment.rb Includes
I like the idea of "instant functionality" Engines can offer, but
practical implementation issues make adding and removing more tedious
than it should be.
The process typically requires:
- manual modifications to environment.rb ( e.g., adding engine
configuration and "Engine.start :myengine"
- manual modification to app/controllers/application_controller.rb
This should be
2007 Nov 20
3
Plugin: can't call before_filter in ApplicationController
Hi all
I want to outsource an extension for ApplicationController, that I had
in application.rb so far, into a plugin.
I have created this plugin, and in init.rb I load
require File.dirname(__FILE__) + ''/lib/application_controller''
In lib/application_controller.rb I have the following code:
class ApplicationController
before_filter :prepare_user
...
end
This worked
2007 Jun 26
4
Fake SSL in specs when using ssl_requirement plug-in
Hi
I''ve used the ssl_required line from the ssl_requirement plug-in at
the start of a controller for SSL. Its implemented as redirects so I
can spec this...
describe "GET /gap/get_qote" do
controller_name :gap
it "should redirect to the HTTPS version of the action" do
get ''get_quote'', :id => "finance"
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking
which banner is displayed via different controllers but initially I''d
just like to set a single banner application wide and display it in my
"_header", a partial I include in all layouts.
I''ve got a BannerAdvert model, simple. If I''m in my welcome controller
index action