Conversation
|
@mrcasals, thanks for your PR! By analyzing the history of the files in this pull request, we identified @oriolgual, @josepjaume and @beagleknight to be potential reviewers. |
There was a problem hiding this comment.
Freezing immutable objects is pointless.
There was a problem hiding this comment.
Freezing immutable objects is pointless.
There was a problem hiding this comment.
Redundant curly braces around a hash parameter.
There was a problem hiding this comment.
Freeze mutable objects assigned to constants.
Use %w or %W for an array of words.
There was a problem hiding this comment.
Extra empty line detected at class body beginning.
There was a problem hiding this comment.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Align the parameters of a method call if they span more than one line.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Missing frozen string literal comment.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
0983ca7 to
ed14883
Compare
There was a problem hiding this comment.
Closing array brace must be on the same line as the last array element when opening brace is on the same line as the first array element.
There was a problem hiding this comment.
Align the elements of an array literal if they span more than one line.
There was a problem hiding this comment.
Align the elements of an array literal if they span more than one line.
There was a problem hiding this comment.
Align the elements of an array literal if they span more than one line.
There was a problem hiding this comment.
Align the elements of an array literal if they span more than one line.
There was a problem hiding this comment.
Within %w/%W, quotes and ',' are unnecessary and may be unwanted in the resulting strings.
ed14883 to
e7b0ce1
Compare
There was a problem hiding this comment.
Align the parameters of a method call if they span more than one line.
e7b0ce1 to
b31dd01
Compare
beagleknight
left a comment
There was a problem hiding this comment.
Wow, amazing job dude!
b31dd01 to
6882949
Compare
Current coverage is 60.81% (diff: 72.22%)@@ master #334 diff @@
==========================================
Files 3053 3004 -49
Lines 123661 122998 -663
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 75435 74796 -639
+ Misses 48226 48202 -24
Partials 0 0
|
There was a problem hiding this comment.
WUUUT nooooo monkeypatchingggg. Why can't you explicitly add this on the models that need this?
There was a problem hiding this comment.
That was added by the Dragonfly generator, man. Anyway, I'm dropping all of this
There was a problem hiding this comment.
Add this in the engine instead of the initializer.
There was a problem hiding this comment.
Please use a cache storage instead of filesystem, as filesystem is volatile in some platforms like heroku.
There was a problem hiding this comment.
This seems a potential security risk, I'd rather create the avatar in a callback at the model
There was a problem hiding this comment.
Also, I think there are too many public params, and it could also be a way to guess users by ID.
|
@oriolgual there's other options like https://github.com/lucek/avatarly |
|
@josepjaume @oriolgual |
|
@josepjaume @oriolgual finally going to set a |
|
@mrcasals not sure a @oriolgual what do you think about this? |
|
I mean, one of the reasons the command pattern exists is to be able to make this kind of flows more explicit - callbacks tend to be problematic. |
|
Works for me @josepjaume |
|
@oriolgual @josepjaume we don't have a command for user registration, because this is done via Devise automatically. |
|
Update: in order to generate avatars, it looks like we need rmagick, and having both rmagick and minimagick does not work well. My proposal is using Gravatar, since it gives us some benefits:
Cons:
@oriolgual already gave his OK offline. @josepjaume thoughts, please? |
|
Another benefit: we spend 10x less time on this feature xD |
|
One of the goals of the project is to have 0 dependencies on external providers, so I'm -1 on this. Let's just put a default avatar placeholder and see if we can improve this later on. |
|
@josepjaume @oriolgual should the system admins also have an avatar, or we can skip them? |
|
@mrcasals late to the party, but let's skip avatars for system admins xD |
6882949 to
d422e58
Compare
There was a problem hiding this comment.
Unused method argument - args. If it's necessary, use _ or _args as an argument name to indicate that it won't be used. You can also write as default_url(*) if you want the method to accept any arguments but don't care about them.
There was a problem hiding this comment.
Unused method argument - args. If it's necessary, use _ or _args as an argument name to indicate that it won't be used. You can also write as default_url(*) if you want the method to accept any arguments but don't care about them.
d422e58 to
9e2dd91
Compare
|
You should talk with @beagleknight to standarize how avatars are shown in comments. |
🎩 What? Why?
This PR adds avatars to users, and sets a default avatar to:
📌 Related Issues
There's no issue for this, but a discussion for this arose in #250. I needed this too in #309.
📋 Subtasks
📷 Screenshots (optional)
None