#RubyOnRails - 28 November 2018
« Back 1 day Forward 1 day »
[03:18:41] kapil____: Hello i see many people use django. what is difference between rails and django?
[03:33:31] havenwood: Django has its own templating language and admin generation stuff, for better or worse. It used to be ahead in the WebSocket game with Twistd, but these days there's ActionCable.
[03:39:08] adgtl: Devise experts.. can someone help me to fix this issue? https://gist.github.com/4655478286cf10f3a02c00a6556109c3
[03:40:14] havenwood: kapil____: I don't think you're missing anything, other than maybe that there are many fine options and it comes down to what you're doing and aesthetic preference.
[03:42:02] baweaver: If you keep jumping off to new things you're not really going to build much skill
[03:42:37] baweaver: You end up with applications implementing 5-6 technologies you're not familiar with
[03:43:21] kapil____: oh i am thinking to learn python. still not learned elixir completely, should i not learn it now?
[03:43:25] baweaver: If you do everything from scratch you'll have no idea how to debug any of it or which part is broken
[03:43:43] baweaver: Earlier you tried to learn Rails, React, GraphQL, and a lot of other things at once
[03:44:04] baweaver: and you were really struggling to see how it all worked together, and I'd mentioned to do just Rails
[03:44:48] baweaver: You can learn 50 things, and stay at a novice level, or learn one thing well and learn how to take that deeper to develop your skills
[03:45:12] baweaver: Not to say you shouldn't eventually do so, but for you at where you're at now I'd stick to just one tool.
[03:48:02] baweaver: I say all of this because you tend to meander through many different frameworks and languages, and get lost because of it
[03:48:13] baweaver: so better to focus on one and learn it well than focus on many and learn little.
[08:02:57] baweaver: What level? What are you wanting to cover and how do you want to distribute it?
[08:03:35] baweaver: Much like testing there are various levels of documentation, each one important for their own reasons and each abstraction being significantly more brittle.
[08:07:03] baweaver: I've taken to calling them names similar to testing. Unit documentation (individual functions as individual units) I would recommend YARDoc. API documentation (endpoints, or public APIs for a gem) I would recommend YARDoc or API Pie. Workflow / Integration documentation (Full processes and complete workflows) I would recommend considering a static site generator, wikis, or again using YARDoc with its document feature for expanded areas.
[08:07:38] baweaver: Now there are a lot more types to consider, sure, and the higher level concern they are the harder it is to keep them consistent which means more build process and integration checks
[08:08:08] baweaver: Really I tend to prefer YARDoc for most things, and API Pie for generating API documentation.
[08:08:20] baweaver: Though eventually you end up with workflow type documents like you see with the Rails documentation which are static sites
[08:58:33] cheeti: hi i am activated active_model_otp in my rails 5 application. users can enable and desable two factor authentication. but in login for i am showing token field, is ther any way to show login form in second step if user enabled 2 factor authentication?
[15:48:16] brianpWins: I’m using the attributes api with a jsonb, and deserializing the data into an array of PORO’s. I’ve realized on first load of the parents (AR) object everything is fine. But if I call `changed?` or any dirty tracking method it calls the deserializer again, creating new PORO’s and considering the custom attribute changed.
[15:48:29] brianpWins: For reference it’s essentially this: http://jetrockets.pro/blog/rails-5-attributes-api-value-objects-and-jsonb
[15:49:35] brianpWins: I’m sure I can find workaround for this, and would be all ears. But I’m also wondering if this could be considered a bug? Should dirty tracking be deserialzing the db strings again? It’s already done it before, seems like extra work to do it again.
[15:58:33] brianpWins: Ahhhh finally found a super old rails 3 issue descirbing similar behavuour and sounds like it’s all by design
[16:06:52] brianpWins: orrr, maybe the accepted use case is in place changes on nested data structures, but not supported is when they’re deserialized to something that’s a non standard type. Which makes sense because they can’t support diffing random types.
[16:07:31] brianpWins: I wonder if there’s an interface to make the comparisons generic, like simple defining <=> and if there is support for that. Im going to check that out
[16:29:57] brianpWins: I have the custom type defined with serializer/deserializers. I can also define my own check for `changed_in_place?` and manage equality however I need to