winton / stasis

Static sites made powerful
http://stasis.me
MIT License
679 stars 56 forks source link

How do I pass in query parameters to controller actions? #76

Closed satelin2002 closed 11 years ago

rudolfochrist commented 11 years ago

Could you be more descriptive on what you're trying to accomplish? I think I don't fully understand it.

Anyway. I try to give you an answer.

Since stasis is a static-site generator, your controller actions don't have access to an actual request. The controller handles specific behavior while you're compiling your templates into static HTML files (which then can be served by your web server).

In other words, when your web server receives a request the controller actions won't be executed again. Hence you cannot access any query parameters from your controllers.

If you absolutely need this, stasis might not be the right tool for you. Maybe sinatra is the better fit for your project.

winton commented 11 years ago

Thanks Sebastian, you are correct.