search for: login_path

Displaying 15 results from an estimated 15 matches for "login_path".

2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
...le to register a user, login & logout. Now, I would like to add more features, get more of authlogic working. I''m using Railscast EP 160 as my reference. Portions of the code found on the tutorial throw errors: Eg: <!-- layouts/_topbar.erb --> <%= link_to "Login", login_path %> and I get the following error message: undefined local variable or method `login_path'' for #<#<Class:0x0000000311e8f8>:0x0000000310af38> To overcome this, ive just used a string. i.e. <%= link_to "Login", "/UserSessions/new" %> Now it seems l...
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake routes to make sure it was there and it was but for some reason new_session doesn''t work. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2008 Mar 16
1
form_for error
...in? %> <%= link_to "Sign Out", logout_path %> <% else %> <%= link_to_function "Sign in", "$(''signin'').toggle();$(''signin_link'').toggle()", :id => "signin_link" %> <%= form_tag login_path, {:id => "signin"}, {:style =>"display: none"} %> Log In<%= text_field_tag ''login'' %> Password<%= password_field_tag ''password'' %> <%= submit_tag ''Sign In'' %> <% end %> &l...
2007 Jun 19
2
Session Problem with Ajax Call
Hai,, I am totally new to Ajax. I am trying to use ajax in my project. Its working fine, I am getting problem while session time expires. If session expires means i am redirecting to login page.Onclick i am calling on ajax function. It will goto controller and it will check the session if session expires then it has to goto login page. On ajax call i am updating the div. If session
2010 Jun 11
2
How to raise a 403 error?
Hello all, I am working on Rails 3, and I would like to return a forbidden error message from a controller. I had trying something like that: def my_action respond_to do |format| format.html { redirect_to(login_path, :warning => I18n.t(''.forbidden''), :status => :forbidden) } format.xml { render :xml => I18n.t(''.forbidden''), :status => :forbidden } end end But it is not want I need, because I don''t want to redirect to a particular page, such as lo...
2010 Nov 10
2
[Cucumber]Which example fails??
...nd username Scenario Outline: Test login for role Given user should exist with email: "test-g0R8lVqzWK4@public.gmane.org", name: "tester" And the user with email: "test-g0R8lVqzWK4@public.gmane.org" is a "<role>" And I am on login_path And I should see "Inloggen" within "h1" When I fill in "login" with "test-g0R8lVqzWK4@public.gmane.org" And I fill in "password" with "123456" And I press "login" And I should see "Wel...
2010 Feb 20
23
Rails 3 possible bug in Routing
Hi, I just ran into this ActionController::RoutingError and just wanted to check if someone can confirm this as a bug in the Rails 3 beta gem. config/routes.rb contains: get ''login'' => ''session#new'' post ''login'' => ''session#create'', :as => :login GET /login works fine: Started GET
2007 Nov 02
4
Login Redirect - Hacking the session[original_uri]
Hi There, I have several ajax elements that require authorization, but for various reasons, they can''t pass session[original_uri] to the redirect on user log in. I''m trying to hack in a uri by passing a param to the login page. I can see that the param is passing into the login page, but for whatever reason, no matter what I do, the user is redirected to the homepage after
2009 Oct 06
1
Problems Processing multiple form elements generated by javascript actions
...save(false) end end User Controller def new @user = User.new end def create cookies.delete :auth_token @user = User.new(params[:user]) @user.save! flash[:notice] = "Thanks for signing up! Please check your email to activate your account before logging in." redirect_to login_path rescue ActiveRecord::RecordInvalid flash[:error] = "There was a problem creating your account." render :action => ''new'' end def edit @user = current_user end def update params[:user][:existing_schedule_attributes] ||= {} params[:user][:existing_season_attr...
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private def require_user unless current_user store_location flash[:notice] =
2008 Sep 23
5
Problem getting Rails to emit the correct (proxy) domain in route urls
...logout ''/logout'', :controller => ''sessions'', :action => ''destroy'' map.login ''/login'', :controller => ''sessions'', :action => ''new'' end In my views I make reference to login_path and logout_path and these correctly form fully-qualified absolute URLs which include the https:// protocol directive. But **they point to the wrong server**. I am supposed to get https://www.mydomain.com/myapp/login but instead I get https://myapp.mydomain.com/myapp/login. What do I have to do to...
2009 Jan 04
4
Adding routes and link_to
Hello. I''ve added some routes : map.news ''news'', :controller => :News, :action =>:index map.login ''login'', :controller => :Login , :action =>:index When I go to /news or /login before adding the routes, it works well. When I add the routes and clik on the link that goes to /news or / login, I got a 500 internal error with this :
2010 Jan 31
6
Action path - syntax error, unexpected tIDENTIFIER, expecting ')'
I have a user controller with login as action. When I access the index.html.erb file via application.layout file. I get a error on the login link on the index.html.erb page. I think I am having dfifficulty in setting up path to an action or even understanding how to set REST path properly. Can someone please help me. Here is the error on the home page:
2010 Dec 21
5
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Hey all, I know that this: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id means that I have an instance variable that has not been initialized. However, I''m a little confused as to what to do in a signup form for form_for: <% content_for :login do %> <% form_for @user, :url => { :action => "login" } do
2008 Mar 01
15
before_filter strange behaviour on update and create
Hi, I wrote a authentication script and I''m calling it like this in every class: class Blah < ApplicationController before_filter :auth def auth req_perm = Permission.find_by_name("Permission Blah") access = AccessController.new() if access.is_logged_in(session.session_id) if !access.get_current_user(session.session_id).role.permissions.include? req_perm redirect_to