search for: login_form

Displaying 17 results from an estimated 17 matches for "login_form".

2007 Aug 21
7
Signin to LinkedIn
...#39;'rubygems'' require ''mechanize'' agent = WWW::Mechanize.new home_page = agent.get(''http://www.linkedin.com'') signin_page = agent.click home_page.links.text(''Sign in'') puts "\nSIGNIN PAGE" pp signin_page login_form = signin_page.form(''login'') login_form.session_login = ''LOGIN'' login_form.session_password = ''PASSWORD'' welcome_page = agent.submit(login_form, login_form.buttons.first) puts "\nWELCOME PAGE" pp welcome_page <<<&lt...
2006 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action? Thanks Frank --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 May 20
0
Urgent :: File Object problem
...= WWW::Mechanize.new #Ignore these line if not using a proxy #agent.set_proxy(''192.168.85.2'', ''80'') #agent.read_timeout=10000 #agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.realtor.org/nrdslogi.nsf/LoginUserInfo") login_form = page.forms.with.name("__TraceLogin").first if login_form == nil puts "The Realtor site is not available at the moment!!!" else #1. Login to Realtor site login_form.Username = "154440" login_form.Password = "jake" login_form.PWORD = "jake&quo...
2006 Apr 21
1
Catch authentication result from a model in a controller
...m 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 screen(login_form.rhtml) again with a message telling him that the auth failed, here are my code: #model----------------------------------------------------- require ''digest/sha2'' class User < ActiveRecord::Base validates_uniqueness_of :username def password=(pass) salt = [Array.new(...
2006 May 25
5
Setting a global before_filter action in application.rb
Can you set a global before_filter action in application.rb? So, for example, you could control authentication for all of the controllers in an app.? Obviously, you would need a way to reference actions by controller within this "global before-filter". Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 Aug 10
4
1.1.5 Upgrade and config.load_path not working
...ath(RAILS_ROOT), "rails_shared/helpers") ] config.load_paths += [File.join(File.expand_path(RAILS_ROOT), "rails_shared/lib") ] And within rails_shared/controllers I have a login_controller. When I hit the stie I see this: Routing Error Recognition failed for "/login/login_form" I had previously tried to use controller_paths but that had never worked for me. Anyone have any ideas? Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060810/5bf74f4c/attachment.html
2006 Jun 27
5
Can''t call public application.rb method from ERb template
All, I have a left navigation partial that I want to dynamically generate CSS classes for based on the current controller action. In my ERb template, I have <DIV class="<%= get_menu_display_style(''login_form'') %>"> In application.rb, I have the method get_menu_display_style defined as: public def get_menu_display_style(action_requested) action_name.eql(action_requested) ? ''left_nav_button_selected'' : ''left_nav_button'' end But when I go to my...
2010 Jan 30
0
bug or desired behaviour? couldn’t identify form using string ‘post’ but ‘POST’. html contains ‘post’ though
...the code that didn''t work although the page source code says ` <form class="login" method="post"> ` Please see more info on http://stackoverflow.com/questions/2165834/bug-or-desired-behaviour-couldnt-identify-form-using-string-post-but-post Thank you Radek `login_form = page.form_with(:method => ''post'')` and code that works `login_form = page.form_with(:method => ''POST'')` I inspected the form object via `puts page.forms.inspect` and got [#<WWW::Mechanize::Form {name nil} {method "POST"}...
2008 May 08
7
Rspec Stories / Selenium Nightmare
I have been using Rspec stories with Webrat feeling very productive and happy. Then I needed to do something with Selenium (Webrat could have done what I needed but it does not yet have the functionality). Selenium-core as part of a rails plugin looked nice but did not seem to fit with rspec stories. So I went the Selenium-rc route. Since Selenium uses a separate instance of rails
2006 May 30
5
Implementing HTTPS with WEBrick?
All, I would like to test some secure pages that I''m developing in my WEBrick-based development environment. I''ve done some research and it appears that I need to create a new command that will start a HTTPS based WEBrick server. Is this correct? Also, it appears that the https.rb module is not included with the WEBrick bundled in Rails. So, I will need to go get that
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
2006 Aug 09
0
Routing: Best default route for static files?
...t I''m serving from my app. I get lots of "ActionController::RoutingError" errors in my log, but then these files are served anyway by Apache. Here is my routes.rb file: map.connect '''', :controller => ''e_simply'', :action => ''login_form'' map.connect '':controller/:action/:id/:data'', :data => nil map.connect '':controller/:action/*filename'' 1) What is the best route to use to allow anything through that I would put at the bottom of this list so that I don''t get routing er...
2006 Apr 24
0
observe_field inside of a form?
...and rendered instead of the action I specify in the observe_field method. All of the observe_field examples I''ve found are done using a single input tag, no containing form...is this the issue or is it something else I''m missing? <%= form_tag %> <fieldset id="login_form"> <p>Please Log In</p> <p> <label for="user">Username:</label> <%= text_field("member", "username", "class" => "text required", "id" => "username") %> <...
2007 Oct 24
0
ERROR
This is interesting. Aptana has been crashing on me all day and now I get this weird error message - not sure if they are related, but here is the error message: Errno::EINVAL in Admin#login_form The funny thing is that this was working this morning and I haven''t made any changes to this particular controller or project. Just wondering if anyone has seen this error message before and has any insite? Thanks all, -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~---...
2006 Mar 24
2
ajax redirection
Hi, Is there a simple way to redirect towards another page (controller, action) when using form_remote_tag ? I used it tipically to check fields of a account login form. I''d like if the user exists, he''s redirected towards another page, otherwise I display some error div''s. Any ideas ? Thanks a lot. Seb
2008 Jan 16
4
ActionController::InvalidAuthenticityToken in LoginController
Hi, I''m having a problem trying to get a login controller working. When I try and post to my login controller I get the following error: ActionController::InvalidAuthenticityToken in LoginController#login login_controller: class LoginController < ApplicationController def login case request.method when :post if @session[''user''] =
2008 Mar 19
7
Upgrade to 2.0.2: InvalidAuthenticityToken error on 1st POST
...he "InvalidAuthenticityToken" error. I have protect_from_forgery :secret => ''my_secret'' set in application.rb and I am using an active_record session store based on this line in environment.rb: config.action_controller.session_store = :active_record_store My login_form is generated using form_for(). However, I am using text_field_tag and password_field_tag to generate the form fields inside of this form, so the form is not truly bound to an object like most Rails forms. I can see that my login form is posting the hidden authenticity_token. And I can also see th...