Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cypriss
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
cypriss
12y ago
I agree that 'context' and passing this context between middleware is the biggest missing item from the standard http+"pat". This library (Goji) solves it with a map[string]interface{}. This works, but has the downside t
2.
▲
by
cypriss
13y ago
We're talking microseconds here, not milliseconds
3.
▲
by
cypriss
13y ago
As another commenter mentioned, I learned about Martini midway through writing this. I really like Martini - if it existed a bit earlier, I probably would have just used it and been happy. That being said, there are some differences between
4.
▲
Why I wrote gocraft/web
(developer.uservoice.com)
34 points
by
cypriss
13y ago
|
15 comments
5.
▲
by
cypriss
13y ago
I believe this is solved with gocraft/web: https://github.com/gocraft/web The middleware would be, per the example there: func (c *YourContext) UserRequired(rw web.ResponseWriter, r *web.Request, next web.Next
6.
▲
by
cypriss
14y ago
You're right about the attr_accessible statement not being entirely accurate. Rails 3 does indeed have the concept of contexts. And, we're still on Rails 2.3 :). It also seems like Rails 4 will being going Strong Attribute route.
7.
▲
by
cypriss
14y ago
It seems like what you've done there is create two mutations (signup and delete_account) within a single namespace. You can certainly do that with the Mutations gem. What I think you're getting at is: can you just replace controllers with
8.
▲
by
cypriss
14y ago
We're using this in Rails 2.3 without Strong Parameters. Mutations whitelist input just like strong parameters do. I don't really see why you would use both, although you certainly could. The duplicate of validations between models and muta
9.
▲
by
cypriss
14y ago
That's exactly the analogy I was going for. You don't want your general ruby code to be typed-checked, but it's actually fairly important to make sure your user inputs are checked, especially until Rails battens down its hatches.
10.
▲
Introducing Mutations: Putting SOA on Rails for security and maintainability
(developer.uservoice.com)
71 points
by
cypriss
14y ago
|
22 comments
11.
▲
by
cypriss
15y ago
We use Mailgun at UserVoice.com for incoming mail. Of particular help to us: - All emails are converted to UTF-8 - There's always a 'plain' (text only) version of the email sent to us, even if the original email only included HTML. - They o
12.
▲
by
cypriss
15y ago
This type of programming is incredibly useful when writing efficient code in low level languages (eg, linear algebra in C). When writing Ruby web apps, though, I haven't found a need yet to think about cache lines or associativity.