This needs a long explanation on how routes, ontrollers, links and buttons work in Rails.
i have used code: <input type="button" value="Login" onClick="window.location='http://localhost:3000/logins/show.html'"/>
In your views use the rails view helpers link_to and button_to.
The code you have there would have to be changed to point to a different location every time you changed the location of your app which is just a right royal pain in the posterior. Rails sets up routes for you to use in the routes.rb. Most are automatically generated for you when you create a new scaffold so you should make use of them
The equivalen to what you have there would be
But that wouldn't work for exactly the same reasons as your code wouldn't work.
That code doesn't care about the absolute path of your application as it is relevant to the root of your application only. There are other huge benefits to using the rails view helpers such as being able to automatically switch between http and https with a simple force ssl command and it allows you to make use of the asset_host so you can add an image_tag that shows an image located on a sperate server thereby speeding up site responsiveness dramatically, These are just a few of the benefits of using the Rails helpers. There are many more. In a nutshell use the Rails conventions, don't fight it.
The code you have there is calling the logins controller with an HTTP POST request. The show action of controllers is typically routed as an HTTP GET request, the route for the show action will be expecting the first parameter to be the id of the record you wish to show hence the id=>'edit'. in your params.
Use a link_to to get to HTTP GET requests. a login action rightly needs a button therefore the button needs to point to a POST or PUT request which will be routed to a create or update action in your controller. Thee actions would then redirect to the show or index actions.
The actual error you are seeing is because the show action will try to find a record in the database with an id taken from the parameters passed in
and there will be no record in whatever table the find is being done that has a value of "edit" in the id column.
This is a massive subject to cover, can I suggest you watch a few railscasts videos starting with http://railscasts.com/episodes/250-auth
What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)