similar to: class filter: cannot call protected controller methods

Displaying 20 results from an estimated 1000 matches similar to: "class filter: cannot call protected controller methods"

2006 Jan 29
3
SHLG and lib dir
Slowly figuring out how to get my SaltedHashLoginGenerator stuff working. The wiki page says to put "before_filter :login_required" in the user (my "user" is "member") controller or in ApplicationController. However, wherever I put it I get NoMethodError. The rest of the SHLG stuff seems to be working... or at least I could get to the signup page, register, and
2006 Mar 29
5
EdgeRails: "undefined method `weight'' for #<Hash:
Hi all, I was playing with the sample project found on the Wiki at http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails , and everything was working fine, ... till I moved to EdgeRails : undefined method `weight'' for #<Hash:0x22c7150> (full error thread below) Any idea? Alain
2005 Dec 18
2
[Bug?] in tests, @foo.bars_count <> @foo.bars.count
Example: if a ''foo'' has 3 ''bars'', bars_count == "0" # ERROR bars.count == 3 # OK It looks like a bug to me. Alain -- Posted via http://www.ruby-forum.com/.
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
2005 Dec 21
7
Are there any disadvantages to using locomotive
Hi: I had some issues and so switched to locomotive. I find it awesome. 1 click and its done. My question - what disadvantages are there, if any? What do I lose by using such a convenient solution. speculation as well as facts are welcome but please define which you are putting forwards. Thanks in advance, bruce
2008 Jun 17
3
Help with error - uninitialized constant AuthenticatedSystem::Base64
I am using restful_Authentication plugin combined with the built-in http_basic authentication Rails 2.0.2 The following code in my controller seemed to work fine, 1. before_filter :authenticate 2. 3. def authenticate 4. case request.format 5. when Mime::XML, Mime::ATOM 6. if user = authenticate_with_http_basic { |name, pass| User.authenticate(name,
2005 Dec 16
4
Parent Child together in input form
Hi all, I understand how rails is supposed to work when dealing with one entity input form. However, when I have a relation between two objects (composition): Customer(1) --------> (1)Address How can you create a inputform where both the properties of a Customer and Address can be filled in? Regards, Harm de Laat _______________________________________________ Rails mailing list
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
I am a relative RubNub and attempting to implement auth_generator v.2.0.1. I am getting an "undefined method `login_required'' for #<ArticlesController:0xb732c0b4>" error when I attempt... http://localhost:3000/articles/new Help would be appreciated. My app/controllers/application.rb reads... ------------------------------------------------------------------------
2006 Feb 14
20
Adding payment to an app: how hard and risky is it?
Hi all. I have never implemented online payment and it''s the only thing that keeps me from accepting a project for a UK based client. (I must reply quickly!) While I can afford spending an extra week - or 2 - to learn/try/tune the payment system, I must be sure to succeed before I accept the contract. If you''ve already been through that path, any hints, links and/or
2006 Apr 25
0
completely stuck on Role-Based Authorization
Im completely stuck on Role-Based Authorization (I used the rails recipe method) (user_controller.rb) def login return if generate_blank @user = User.new(@params[''user'']) if @session[''user''] = User.authenticate(@params[''user''][''login''], @params[''user''][''password''])
2007 Oct 15
0
Fwd: Content filtered message notification
I''m not sure why mailman bounced your message (perhaps because you are not subscribed to the mailing list), but I''m glad you have solved your problem. Cheers, James. ---------- Forwarded message ---------- From: mailman-bounces at rubyforge.org <mailman-bounces at rubyforge.org> Date: 14 Oct 2007 17:21 Subject: Content filtered message notification To:
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people! Still rspec nuby: I must do something wrong obviously. How can I spec about redirect_to at ApplicationController describe ApplicationController do it "method login_required should redirect to home path without login" do pending "I tried to use controller.login_required.should be_redirected and got NoMethodError with nil object
2010 May 27
3
before_filter always running in test, not in development or production mode.
I''m using Shoulda and restful_authentication on Rails3 and whenever I run my tests a before filter for login_required is always triggered, despite my filter being set up as: before_filter :login_required, :only => [:update, :edit, :suspend, :unsuspend, :destroy, :purge] My test is this: context ''A guest to the site'' do context ''on GET to
2006 Feb 27
3
Send parameter along with method in before_filter
Hello list, I have an app that has a very simple authorization scheme. A person can have many roles and roles can have many people. In my app, I''d like to do before_filter :login_required (since no role name is provided, it accepts any users with credentials) before_filter :login_required ("administrator") (only accepts those with role administrator) before_filter
2005 Aug 17
4
Stop an action ?
Hi. I am working on a generic authentification system for rails (more complete than the login generator). The way it works is you call a method inside your action, passing the domain as a parameter (domains are like a group of users with specific rights). For that purpose, I need to exit the action inside this method because it redirects to a login page if that person isn''t
2005 Dec 16
6
managing belongs_to fields in a form
Hi all, I cannot find a clean way to create/edit an object that ''belongs_to'' another one, just by using form fields. I always need to explicitely unassemble it, store the master id in a hidden field, and then refetch the master from its id, and put it back in the object. To summarize: I want to create a new member, for a given project @project= ... @member =
2006 Feb 14
4
Escaping the AJAX View
I have a login form, in which I use a "form_remote_tag". I''m redirecting users to this form when they fail authentication as well... and using the "jumpto" method of capturing they original URL they requested via request.parameters, and redirecting to this URL after they authenticate. Problem is, if I try to do a "redirect_to", this won''t work, as
2006 May 17
13
Using NTLM for S.S.O. in Rails
Greetings all, To all the good souls that happen to know NTLM and Rails.... Short version: -------------- - I''m looking for server code to extract credentials through NTLM dialog with the client (IE) - I found nothing usable/useful (as they both implement the client side code) in - rubyntlm on rubyforge - lib ntlm-ruby by Jonathan Bastien-Filiatrau LONG version:
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi, I just installed Rails 2.0.2 [root@mymachine easyx]# ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] [root@mymachine easyrx]# gem install rails --include-dependencies Need to update 16 gems from http://gems.rubyforge.org ................ complete Successfully installed rails-2.0.2 [root@remandev easyrx]# But I''m getting this error in my restful_authentication
2006 Oct 09
1
restful authentication - filtering out login ??
i am unable to reach the login page when adding ''before_filter :login_required'' to the application controller. I HAVE added the following to my sessions controller ''before_filter :login_required, :except => [:new, :create, :destroy]'' I figured this would overload the app controller filter but i get this loop while it looks for sessions/new and isnt allowed