Displaying 20 results from an estimated 300 matches similar to: "Can before_filter using Proc and specify block ?"
2009 Mar 25
0
CentOS won't shutdown ... or do anything else
I started to have problems similar to ones described in the past on
this list but could not find any kind of resolution. I did an
lsmod, a mount command, and for fun, did an strace on shutdown to
see where it is hanging, and an ltrace as well.
Any thoughts?
Module Size Used by
parport_pc 28033 0
lp 15661 0
parport 38153 2
2011 Sep 20
0
Adding a data in Live OR Saving Stream on Server side.
On Tue, Sep 20, 2011 at 3:33 PM, Narendra Sisodiya
<narendra at narendrasisodiya.com> wrote:
> What data I want to add ?
> basically on my website there are various images. each image having ?a
> number. While I deliver my lecture I want to send image number too.
> Now I can send this number using http PUSH/PULL but I do not know How
> it will be synchronised ? Because AFAIK
2012 Jun 11
3
Samba 4 provisioning error on Ubuntu 12.04
Hi all,
I am trying hard to get a Ubuntu server up and running with Samba 4 installed so it can function as an? Activie Directory server in windows network.
I installed 12.04 on a reasonable box and this went well.
I then followed the instructions for getting Samba 4 installed and running.
http://wiki.samba.org/index.php/Samba4/HOWTO#Samba4_HOWTO
I was able to complete steps 1 to 3 - get,
2005 May 24
16
dhcp and shorewall
I want to run dhcp and shorewall on the same computer.It is
my gateway and that computer doing NAT for my network.How
can I set up shorewall to let only users that get theire
static ip address via dhcp, not to let users that had
static address.
2004 Oct 08
4
Problem with VPN routing from internal network
Hi folks,
I have the two firewalls (Slackware current) in differnt cities connected via OpenVPN.
I can ping the network behind server firewall from client firewall server.
But how to route/iptable network traffic from the network behind client firewall to see the netwrok behind server firewall?
Thank you
Remus
2002 Oct 26
1
2.2.6-1 src rpm
I'm trying to get the 2.2.6-1 src rpm for RH 7.x from samba.org compiled
on RH 8.0. I built it as root with this command
rpmbuild --rebuild --target i686 samba-2.2.6-1.src.rpm.
Trying to install the built RPM (no errors in the build process) results
in these unmet dependencies:
# rpm -Uvh samba-2.2.6-1.i686.rpm
error: Failed dependencies:
perl(fix_print_html.lib) is needed by
2007 Dec 04
4
remote logging non-daemon mode
Greetings all. Due to security concerns we are switching our backup
processes from "SSH tunnel to rsync daemon" to "Running rsync over ssh
in --server mode". In daemon mode we had a nice conglomerate log file
of all of the backups that ran. Now that I am tweaking the scripts to
run over --server mode I see that by default there is no remote
logging. From what I have read on
2002 Mar 04
1
String Resources & Popup Problem
Ok, that's done.
Now after this the should compile and run :
in En.rc MAIN_MENU is defined now like this :
MAIN_MENU MENU
{
POPUP "&File" {
MENUITEM "&New...", 0x100
En.rc is included by #include "En.rc" in rsrc.rc.
And gcc complies about it when compiling :
[syl@snoop notepad]$ make
gcc -c -I. -I. -I../../include -I../../include -g -O2
-Wall
2007 Dec 11
0
before_filter work around
Hi All,
I am working on a rails app that has facebook and non-facebook
portions and since facebooker seems to want to resolve to the default
route of "/" i''ve written a little before filter that seems to make
these two exist OK.
def is_facebook_request?
redirect_to(params.merge({ :controller => ''facebook_accounts'' }))
and return false if
2006 Aug 03
1
strange before_filter error. is this a bug i have found?
...
before_filter :find_regression_test
def find_regression_test
@regression_test=RegressionTest.find(8)
end
....
The above seems like perfectly normal before_filter syntax, but it gives
this error. Aldo is no application trace, just a framework trace:
Any idea what is wrong?
NoMethodError in Regression testsController#modify_regression_test
private method `equal?''
2006 Jul 26
5
Restricting before_filter to certain actions?
Can you restric before_filter to specific actions?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 17
2
newbie before_filter question
I''ve successfully gotten acts_as_authenticated working. Currently the
before_filter line for my admin screen is like this:
class AdminController < ApplicationController
include AuthenticatedSystem
before_filter :login_required
Only issue I have now is that anyone logged in can access that screen.
I''d like to differentiate between a regular user and
2006 Mar 10
3
before_filter question
Let''s say I''m using before_filter in my controller:
before_filter :setup
def setup
# do something here
end
Is there any way my setup method can know which action is really about
to be called? Let''s say I want to log out which action is going to be
called, how can I know that in the before_filter method? (My question
is not really about logging,
2008 Mar 16
0
bypassing verify_authenticity_token before_filter when in facebook
Hi list,
Not sure if this is helpful for anyone but I am working on a Facebook
project where I need bypass the new CSRF protection (built into Rails
2.0) under certain conditions. However, since my project works
outside of Facebook I don?t want to disable the CSRF protection from
requests made outside of Facebook.
Here is a small extension i wrote for the ForgeryProtection module.
2006 Feb 20
1
Using :except or :only on a before_filter block
Hi all,
How do you use :except or :only conditions on a filter block? I can''t
seem to work out the syntax!
I''m currently doing:
before_filter { |c| c.role_required ''admin'' }
Thanks a lot!
Tom
2005 Dec 15
2
Passing parameters to before_filter methods
I have a method that checks for a given role. I want to write
something in my controllers like
before_filter :check_roles(''admin'')
Which will ensure the current user has the admin role. Is it possible
to pass parameters in this way?
Ian
2007 Jan 13
0
before_filter not executed in functional tests
Hi,
I have a before_filter ''authorize'' defined in the application controller
that checks for a user in the session. However, when I test a controller
(that has before_filter ''authorize'') like this:
def test_new_without_login
get :new
assert_redirected_to new_session_path
end
the fails because the response is ''success'' instead. When I set
2006 Nov 21
2
before_filter in actionwebservice controller using direct dispatching
The docs say that for direct dispatching mode to use controller
filters, but when the controller is run I get the following error.
The authorize method is in application.rb. Works fine when it''s not a
web service api. Should I be using before_invocation instead even
with direct dispatching mode? Or can I not have the authorize method
in application.rb?
undefined method
2008 Jun 25
2
How to escape from the before_filter for the particular acti
Hi,
We use the following code in the ApplicationController.
before_filter :login_required
Iam aware, this will be called for every action.
How to escape for the particular action?
Thanks,
Ayyanar. A
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Oct 25
1
Returning a variable to before_filter
I know its probably doesnt sound right, but I am trying to call a
before_filter method that will check whats the user role and then
based on that return a string / hash / array to the before_filter
something like this:
class MonqiClassesController < ResourceController::Base
before_filter :check_user_access_level , grant_access
def check_user_access_level
if