Comments (5)
Hello @mvader Thanks for opening this ticket. Are you using this framework alone, or with lotusrb
?
from controller.
I'm using it with lotusrb.
On Apr 7, 2015 11:08 AM, Luca Guidi [email protected] wrote:Hello @mvader Thanks for opening this ticket. Are you using this framework alone, or with lotusrb?
βReply to this email directly or view it on GitHub.
from controller.
@mvader Which kind of error do you get? Is this related to hanami/hanami#196 ? Can you please post the stack trace here? Thank you.
from controller.
I don't get any error. It just doesn't work as expected. I've been able to reproduce even with the fix you mentioned in #196.
Just setup an application with cookies and the session like that:
cookies true
sessions :cookie, secret: ENV['WEB_SESSIONS_SECRET']
Once you've submitted a form with errors, on every other request the retrieved errors via the errors
method are the same, no matter what the input parameters were.
As I said, two cookies are set, maybe that's the problem. I implemented the sessions and cookies myself using Rack::Session and it worked. With Rack::Session only one cookie was set.
New action:
module Web::Controllers::Foo
class New
include Web::Action
def call(params)
puts errors.inspect?
end
end
end
Create action:
module Web::Controllers::Foo
class Create
include Web::Action
params do
param :title, presence: true, size: 3..255
end
def call(params)
if !params.valid?
# foo
else
# foo
end
end
end
end
from controller.
Closing because I think it was fixed by #100
from controller.
Related Issues (20)
- Remove body cleanup for HTTP responses that doesn't require a body (e.g. 204) HOT 1
- Flash #empty? returns true when it's not (after a re-direct) HOT 2
- Hanami::Action::Flash to use swappable JSON backend HOT 2
- Flash message appears twice (redux) HOT 3
- Exception Handling in Production HOT 19
- RuntimeError: can't add a new key into hash during iteration HOT 8
- Compatability issue with hanami-controller 2.0.0.alpha1 HOT 2
- Is `#request` supposed to be memoized for actions? HOT 2
- Standalone actions prevent using non-keyword parameters in `#initialize` (v2) HOT 3
- [2.0.0.alpha1] Uninitialized constant Hanami::Controller::Configuration (NameError) HOT 2
- Handling `config` and other class-level macros HOT 3
- accept syntax in README no longer seems supported HOT 1
- Action params are not coerced? HOT 5
- Badly encoded cookie strings from Safari results in an error HOT 3
- HTTP status 418 is missing HOT 1
- Issue with multipart/form-data format HOT 1
- Support CSRF by HTTP header HOT 4
- Support for hanami-validations/dry-validations `rule(...)`
- Documentation about Controller/Router integration is incorrect HOT 7
- Fix Response#send_file implementation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from controller.