Tatva-Artha

meaning of "it"

Archive for May, 2010

Login as multiple users simultaneously for testing

without comments

Ever wondered how to login as two different users at the same time? The situation manifests in any project where you want to be able to test a workflow involving several actors with different roles. The problem is that browsers allow only one login for a given domain at any one time. So, you are required to logout as current_user before logging in as another. One of the solution people use is install multiple browsers.

Read the rest of this entry »

Written by Sharad

May 26th, 2010 at 8:40 pm

Posted in Technology

Disabling form post in google chrome and safari

without comments


So, I found this issue with google chrome and safari web browser and I believe this applies to any webkit based browser. When a form submit is disabled by setting the submit button to disabled=true attribute, the browser is usually expected to prevent submission when the user hits “ENTER” on any of its text fields. This works fine in Firefor, my default browser.

In my rails app, I had to do this to work around this.

We use haml rendering engine for our project and my form looks like this:

- remote_form_for @product_search, :url => product_searches_path, |
  :html => {:method => :post, :id => 'product_search_form'} do |form|

Read the rest of this entry »

Written by Sharad

May 17th, 2010 at 5:36 pm