<FromGitter>
<nsuchy> @luis_salazar_twitter write us an JWT tutorial for AmberFramework authentication 😉
_whitelogger has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter>
<sclee15> Merry Christmas 🎄
feepbot has quit [Ping timeout: 268 seconds]
feepbot has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter>
<luis_salazar_twitter> @nsuchy would love to :) Actually, Im starting with that precisely. Since Im fairly new, I am not really sure what way is the better. But if you guys can guide me over here, I will love to. Initially I did it as a pipe, but then moved to module into ApplicationController so I can have more flexibility
<FromGitter>
<luis_salazar_twitter> On another topic: Is there any consensus about where to put "extra" code, like rails' concerns? ⏎ ⏎ Where do you guys are having this logic code to keep your controllers slim or reuse code between code bases?
<FromGitter>
<nsuchy> You should be using pipes not polluting the application controller
<FromGitter>
<nsuchy> Pipes really, there aren’t concerns by default
<FromGitter>
<nsuchy> But you should create a folder for them
<FromGitter>
<nsuchy> And import in application.cr most likely
<FromGitter>
<nsuchy> And have the same desired effect
<FromGitter>
<nsuchy> Many simple Ruby on Rails apps don’t directly take advantage of concerns or utility classes so Amber not including it keeps things simplified
<FromGitter>
<elorest> @luis_salazar_twitter Like @nsuchy mentioned above. It would be really easy to create a folder for concerns and include them. Concerns in rails are more of a pattern than an actual thing. They could pretty much be called anything since there isn't really any rails magic that makes them work. Just base ruby magic lol.
_whitelogger has joined #amber
<FromGitter>
<luis_salazar_twitter> Excellent. So i can basically add some folder to src/ like, concerns/ (for the sake of argument). But, what do you guys usually do? Have experienced the need to do it?
<FromGitter>
<nsuchy> For something small as concerns or a utility class I don’t believe frameworks should include by default, most add a concern generator
<FromGitter>
<nsuchy> There’s no ApplicationConcern class to inherit from so there’s no real benefit of Amber including one other then convenience.
<FromGitter>
<luis_salazar_twitter> Super clear. Thanks for the explanation