It there a way to read the params inside a class of a gem I tried require "cgi" and require "action_pack" but no chance... Any clues ?
Thanx
It there a way to read the params inside a class of a gem I tried require "cgi" and require "action_pack" but no chance... Any clues ?
Thanx
Be more precise. The params of what? A submitted form?
If yes, you could do that:
require "cgi"
...
cgi = CGI.new
h = cgi.params
login = h['login'][0]
password = h['password'][0]
and so on.
It seems that CGI.new creates a new object and does not contain the params of current request
Maybe you can use Rack middleware for this. See also http://railscasts.com/episodes/151-rack-middleware for a tutorial.