Displaying 20 results from an estimated 3000 matches similar to: "Bug with skip_before_filter?"
2006 Oct 13
0
can you use only with skip_before_filter ?
I have a before_filter in my applicationController (application.rb) for
protecting all pages in my app:
before_filter :login_required
Then in a product controller i have a skip_filter with the only clause
to allow guest users to access that resource.
#allow access to show only if guest
skip_before_filter :login_required, :only => [ :show ]
This worked fine, allowing guest users to view
2006 May 13
1
newbie question - routes.rb on server
Hello,
I am new to Ruby but not to programming. I have a domain name and server
space with a host who said that ruby on rails should work on the server.
All I want to do is make sure that a test ruby application works online
so that I can begin development on an app. I am able to get the test
program to work locally but not online.
In C:/ruby/projects/test/controllers/TestController.rb:
2006 Jul 22
3
Connection refused - connect(2)
Dear all,
Please help me in this regards,
I am using models to access LegacySchemas using
set_table_name and set_primary_key...
[code for model]
class CdDetails < ActiveRecord::Base
def self.find_data
set_table_name ''cd_details''
set_primary_key ''cd_label''
find (:first,
:select => "cd_label")
end
2007 Jun 10
0
pb when posting to an action "render_text body, :status => 400"
Hi,
I''m trying to do a little openid-server in rails.
I encounter a very strange problem for me, you can see all the story in the
openid mailing-list :
http://lists.openidenabled.com/pipermail/dev/2007-May/000666.html
http://lists.openidenabled.com/pipermail/dev/2007-June/000700.html
In short, the problem is :
the server has to do a "render_text body, :status => 400"
2009 Mar 09
0
skip_before_filter :verify_authenticity_token make session data not accessible.
Hi all,
I''m stucked in following situation: I implemented image upload feature
using swfupload. The submission from swfupload cause exception
ActionController::InvalidAuthenticityToken (rails 2.2) -
understandable because swfupload doesn''t send valid token. I try to
temporarily turn off the checking in the controller by using
"skip_before_filter
2006 Apr 10
1
Error When Sorting
Got a bug I cannot eliminate. My ajax style sorting looks cool but the
position change is never updated. The error (at bottom points to line
52 in my controller and I have indicated that line).
#view
<!-- Question Data -->
<h2>Test Questions</h2>
<div id="list_questions">
<%= render(:partial => "list_questions") %>
</div>
2008 Jan 11
0
trouble skipping before filter in controller
Hello,
In my application I want several before filters to apply to every
request except for login and authenticate. So in my application
controller I have
before_filter :setup_user, :check_for_duplicate_user, :update_timestamp, :kick_if_inactive
then in my user controller which contains the login and authenticate
actions i have
skip_before_filter :setup_user, :only => [:login,
2006 Jan 17
4
textarea problem with accentued chars
Hello, I have a problem with accentued characters return from a textarea
I have 3 simple files to show example ( below ).
index.rhml : If I put "?nial" inside the textarea, then submit to
:action => post
post.rhml : wrote
?nial
195
"\303\251nial"
//
params[:comment][:message] return => ?nial
params[:comment][:message][1] return => 195 ! ( 195 is not
2006 May 11
1
skipping filters
I have a simple login scheme in application.rb. Something like
:requires_login is called in any controller as a before_filter. All is
good, except I''m having trouble figuring out how to make the public
login actions skip this before filter. Here''s what I have:
application.rb
skip_before_filter :requires_login, :only => [:login, :logout,
:confirm_valid_login]
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout
test_controller
def list
layout "stdlayout"
end
in the views/test/layouts stdlayout.rhtml
<html>
<head><title>test</title></head>
</body>
<h1>Test</h1>
<%= content_for_layout %>
</body>
</html>
2) I get Rails Application Error when trying to use a separate
2004 Sep 20
1
NT_STATUS_LOGON_FAILURE with pdc samba + openldap + SuSE9.1
I am trying to configure a samba with openldap as a PDC on SuSE9.1 with
samba-3.0.4, openldap2-2.2.6, samba-winbind-3.0.4, following the book
Samba-3 By Example, by John H. Terpstra.
I am getting errors "NT_STATUS_LOGON_FAILURE" from smbclient commands
and "The username or password was not correct." from 'net' commands.
Anonymous smbclient access seems to work, and I
2006 Sep 12
2
Cache sweeping and render_component (my mistake or Rails bug?)
Hi
I''m working on a program which relies on heavy cache sweeper usage.
I''ve just bumped onto an odd problem. When using render_component
method in layouts or templates with cache sweeping turned on, Rails
throws an exception with the following message:
NoMethodError in TestController#index
You have a nil object when you didn''t expect it!
The error occured while
2006 Apr 23
2
Check if current route == some route
I have a before_filter in ApplicationController in which I want to check
if the current location is the same as a certain route, so that I only
redirect non-logged in visitors to the "join" page if they''re not on
that page already.
The code I came up with is a bit ugly:
redirect_to join_url unless (@logged_in or action_name == "join")
I''m pretty sure
2006 May 04
6
second assert_tag failling in rails integration test
Hi all,
I''m fairly new to rails and ruby, but I''ve come across an interesting
glitch and I''m not sure whether I''ve just got something wrong with my
assumptions or if it really is an error in the underlying framework...
I''ve created a bare-bones set of tests to show you where the problem is.
What follows are the steps I went through to reproduce the
2006 Nov 04
0
Having problems with edge rails
I just switched to Edge Rails (revision 5207) since I want to use the
BigDecimal support for an e-commerce website.. Unfortunately, some of
my old code seems to be breaking things..
First off, it looks like my "skip_before_filter :check_authentication,
:check_authorization, :only => [:login, :forgot_password]" doesn''t
work at all, since the before_filter gets executed for
2006 Jul 14
1
no such file found
I''m trying to set up my app on Linux SUSE, apache2 using fastcgi. Now
at http://host/ I''m able to see the greeting page (index.html in
public). However, if I try to access my app http://host/candidate/index
I keep getting in the log:
No such file to load --
/usr/home/nye/hire/public/../config/../app/controller/test_controller.rb
Did I set my path wrong? What''s
2004 Dec 24
1
LDAP problem, with samba and groups
Hi All
We have the following problem:
We configured samba with LDAP and this works fine. As soon as they try to login wit a user who is member of 15 groups, it takes very long to login with Windows and then an mostly an errormessage appears.
On win 2000 is the error: There has been made a change to the server. Contact you sysadmin
When a user logins (member of 15 groups) ldap shows the
2006 Jul 14
0
no such file to load?
I''m trying to set up my app on Linux SUSE, apache2 using fastcgi. Now
at http://host/ I''m able to see the greeting page (index.html in
public). However, if I try to access my app http://host/candidate/index
I keep getting in the log:
No such file to load --
/usr/home/nye/hire/public/../config/../app/controller/test_controller.rb
...
Did I set my path wrong?
2006 Jun 01
9
access model from controller
Hello,
Rather new to RoR, so I''m not sure about the terminology and such :-/ .
My question is: how could I know the model which is associated to a
controller?
For example:
- controller class is TestController, which is a subclass of
ApplicationController
- associated model class is Test
How could I write some code in a method of ApplicationController to
dermine the current
2005 Dec 29
3
Class Variable Scope
(Hopefully) a quick question about variable scope issues. In one of my
controllers, I have a class variable:
class TestController < ApplicationController
@@testClassVariable = 0
...
The problem is, in my "list" method I''m trying to increment this
variable by one each time, printing it out, but it seems to reset to 0
every time the list method is called:
def list