similar to: filter function with parameter

Displaying 20 results from an estimated 2000 matches similar to: "filter function with parameter"

2006 May 16
2
before_filter and the application controller
Hi there, I''m having a bit of an issue with my before_filter. I know that the filters put in the application.rb controller are global for all the controllers. In my application filter I''d like to allow access to the RSS feed method in a ''member'' controller and skip the login checks that the before_filters are currently performing. In my application my filters
2006 Jul 07
13
Rails Recipes Book: Authentication
Hi, The user/login management system in Chapter 31: Authenticating Your Users and Chapter 32: Authorizing Users with Roles of Chad Fowler''s Rails Recipes looks reasonable and adequate. However, when I ran the Chapter 31 code, I get the following error: Username or password invalid And I am not even given the chance to sign in; that is, the signin form does not appear at all. Has
2006 Aug 07
2
Ugggh..another recipes question
sorry, because it seems that I need more explanation on this Rails Recipes authorization - I finally got the code working but after using the login I get this back from Rails- Routing Error No url can be generated for the hash {} I''m guessing it''s coming from the redirect- def login if request.post? session[:user] = User.authenticate(params[:first_name],
2008 Oct 03
2
Filter chain halted as [:check_authentication] rendered_or_r
I have this page that you login in from. You get authenticated and then bumped over to the appropriate page depending on what your role is: Traveler, Travel Manager, Admin. All pieced work except for the role asssociated with Travel Managers who get tossed out, apprarently when they hit a before_filter to check authenication. However, it seams that they are properly getting authenticated and moved
2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works fine but im getting trouble in how handle the model authorization result, if the user and pass are correct, it goes to a welcome screen(admin.rhtml) but if wrong the model prints a message in an ugly exception like page "usr and pass not correct", i want to redirect the user to the login
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
2007 Jul 17
12
Getting past my login system
Thank you in advance for your help. I am relatively new to both Rails and Rspec and I am hoping for some insight from some experienced veterans. Right now I am using Rspec for code that has already been written so that additional functionality can be developed using the BDD method. My problem shows up when I try to spec controllers that are behind the login system. Each page checks for the
2006 Jun 30
8
before_filter: nil vs. true vs. false
Folks, My understanding of how filters work is that I should return true if everything is ok and false if not. How does the filter below work then (from the Rails Recipies book)? It would return nil if there''s a user in the session. Does nil count as true? before_filter :check_authentication def check_authentication unless session[:user] session[:intended_action] =
2006 Jun 04
5
Embedding link_to''s within text fetched from database.
Hi, I have the following problem that I can''t seem to figure out. I want to able to fetch some text from my database record in my controller, and then add two links within the text and then send that back to the view to get rendered so that the two links appear as links and when clicked on, they''d basically call the corresponding action for the link. Would anybody know how to
2006 Nov 04
0
filter function with parameter
hey, i have found your post about filter function with parameters: Hi! I want to add a function with a static paramter ("2" in the example) to a filter, but somehow Rails seems to be looking for another syntax. before_filter :check_quantity(2), :only => [:show] doesn''t work. What''s the right way to do this? Thanks a lot! --------------------------------- Can
2017 Nov 14
4
[PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops
On 2017/11/13 18:53, Juergen Gross wrote: > On 13/11/17 11:06, Quan Xu wrote: >> From: Quan Xu <quan.xu0 at gmail.com> >> >> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called >> in idle path which will poll for a while before we enter the real idle >> state. >> >> In virtualization, idle path includes several heavy operations
2017 Nov 14
4
[PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops
On 2017/11/13 18:53, Juergen Gross wrote: > On 13/11/17 11:06, Quan Xu wrote: >> From: Quan Xu <quan.xu0 at gmail.com> >> >> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called >> in idle path which will poll for a while before we enter the real idle >> state. >> >> In virtualization, idle path includes several heavy operations
2017 Nov 13
3
[PATCH RFC v3 4/6] Documentation: Add three sysctls for smart idle poll
From: Quan Xu <quan.xu0 at gmail.com> To reduce the cost of poll, we introduce three sysctl to control the poll time when running as a virtual machine with paravirt. Signed-off-by: Yang Zhang <yang.zhang.wz at gmail.com> Signed-off-by: Quan Xu <quan.xu0 at gmail.com> --- Documentation/sysctl/kernel.txt | 35 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/paravirt.c
2017 Nov 13
3
[PATCH RFC v3 4/6] Documentation: Add three sysctls for smart idle poll
From: Quan Xu <quan.xu0 at gmail.com> To reduce the cost of poll, we introduce three sysctl to control the poll time when running as a virtual machine with paravirt. Signed-off-by: Yang Zhang <yang.zhang.wz at gmail.com> Signed-off-by: Quan Xu <quan.xu0 at gmail.com> --- Documentation/sysctl/kernel.txt | 35 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/paravirt.c
2017 Nov 14
2
[PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops
On 2017/11/14 15:12, Wanpeng Li wrote: > 2017-11-14 15:02 GMT+08:00 Quan Xu <quan.xu0 at gmail.com>: >> >> On 2017/11/13 18:53, Juergen Gross wrote: >>> On 13/11/17 11:06, Quan Xu wrote: >>>> From: Quan Xu <quan.xu0 at gmail.com> >>>> >>>> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called >>>>
2017 Nov 14
2
[PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops
On 2017/11/14 15:12, Wanpeng Li wrote: > 2017-11-14 15:02 GMT+08:00 Quan Xu <quan.xu0 at gmail.com>: >> >> On 2017/11/13 18:53, Juergen Gross wrote: >>> On 13/11/17 11:06, Quan Xu wrote: >>>> From: Quan Xu <quan.xu0 at gmail.com> >>>> >>>> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called >>>>
2009 Apr 23
1
Loess over split data
Dear R users, I am having trouble devising an efficient way to run a loess() function on all columns of a data.frame (with the x factor remaining the same for all columns) and I was hoping that someone here could help me fix my code so that I won't have to resort to using a for loop. (You'll find the upcoming lines of code in a single block near the end of the message.) Here's a
2006 Nov 04
3
role based authorization question
I am using the the authorization recipe outlined in Rails Recipes.Is it possible for one role, say ''admin'', to have access to every action on every controller without explicitly having to create a Right for each? I know this will not work as is, and to force it to do so would violate MVC, but is there some other way to accomplish having something like this in a controller:
2017 Nov 14
1
[PATCH RFC v3 4/6] Documentation: Add three sysctls for smart idle poll
On 2017/11/13 23:08, Ingo Molnar wrote: > * Quan Xu <quan.xu04 at gmail.com> wrote: > >> From: Quan Xu <quan.xu0 at gmail.com> >> >> To reduce the cost of poll, we introduce three sysctl to control the >> poll time when running as a virtual machine with paravirt. >> >> Signed-off-by: Yang Zhang <yang.zhang.wz at gmail.com> >>
2017 Nov 14
1
[PATCH RFC v3 4/6] Documentation: Add three sysctls for smart idle poll
On 2017/11/13 23:08, Ingo Molnar wrote: > * Quan Xu <quan.xu04 at gmail.com> wrote: > >> From: Quan Xu <quan.xu0 at gmail.com> >> >> To reduce the cost of poll, we introduce three sysctl to control the >> poll time when running as a virtual machine with paravirt. >> >> Signed-off-by: Yang Zhang <yang.zhang.wz at gmail.com> >>