News for hackers. Stuff that matters.
Re:Ruby Web Dev The Other Way by onetwotree on Thursday July 21, 2016 @01:04PM (#12138281)
Good work!

On some work projects I've gotten a lot of mileage out of breaking with the traditional Rails patterns in favor of stuff like `Operation` objects. Too bad I didn't know about Trailblazer!

I also agree about Rails making excessive use of Ruby magic. Just because it's possible, doesn't mean you should do it.

Regarding non-ActiveRecord models, I use Sequel[1] exclusively at work - in addition to being decidedly less magical, it has wonderful support for most Postgresql specific features.

I'll be consulting this in the future before embarking on new Ruby adventures.

[1] http://sequel.jeremyevans.net/

Re:Ruby Web Dev The Other Way by andrei_says_ on Thursday July 21, 2016 @02:40PM (#12139018)
Do you have experience of using sequel with rails 5?

Also, what do you use for authentication?

Re:Ruby Web Dev The Other Way by JonnieCache on Thursday July 21, 2016 @03:22PM (#12139340)
There's a plugin for Sequel::Model that provides ActiveModel compatibility, which should make it work with the usual rails gems.

http://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Pl...

Sequel is my favourite of the tools I use.

Re:Ruby Web Dev The Other Way by onetwotree on Thursday July 21, 2016 @02:52PM (#12139118)
I don't have experience with Sequel and rails 5 specifically. The thing is, models are really not very coupled to rails. We don't have to do anything special to use Sequel models - it has good support for Rails migrations and everything.

Regarding authentication, my company makes authorization and access control software, so authentication isn't something we just toss a plugin at.

Re:Ruby Web Dev The Other Way by iJackUA on Thursday July 21, 2016 @04:46PM (#12139932)
I haven't used Sequel by myself, but definitely, need to add a mention about it. Thanks!