Shino Kouda(@ShinoKouda) 's Twitter Profile Photo

A short article about how to simplify the Rails console command thanks to the aliases file. bootrails.com/blog/rails-con…

account_circle
Shino Kouda(@ShinoKouda) 's Twitter Profile Photo

To give access to some functionalities that are only available in various contexts, like named route helpers and view helper methods, the Rails console provides 'app' and 'helper' instances.

To give access to some functionalities that are only available in various contexts, like named route helpers and view helper methods, the Rails console provides 'app' and 'helper' instances.
account_circle
Hopper Gee(@hoppergeegee) 's Twitter Profile Photo

Shino Kouda My solution is 'One service per action'. Under each service, you can break down responsibilities with any numbers of POROs you like. github.com/hoppergee/soli…

account_circle
rohan_daxini(@rohan_daxini) 's Twitter Profile Photo

Shino Kouda Nice read.
Minor observation, there is a typo in the module declaration 'Repaire' i.e. extra 'e'

Also, what are your thoughts on 'Composition vs Inheritance'?
thoughtbot.com/blog/reusable-…

account_circle
Adrian Marin 🥑 avohq.io(@adrianthedev) 's Twitter Profile Photo

ERB to Phlex converter by Marco Roth, Shino Kouda talks about `app` and `helper` methods in the console, a fantastic article with Turbo's 7.2.0 new features, and more in this week's @shortruby newsletter 💪
Go subscribe if you haven't yet ✌️

account_circle
Bijan(@BijanRahnema) 's Twitter Profile Photo

Shino Kouda Transaction + pessimistic locking would be my approach here. See the example from Rails API itself. Also for financial stuff it’s err in favor of the customer. So ensure that transactions don’t get double booked etc.

@ShinoKouda Transaction + pessimistic locking would be my approach here. See the example from Rails API itself. Also for financial stuff it’s err in favor of the customer. So ensure that transactions don’t get double booked etc.
account_circle
Celso on Rails(@CelsoDeSa) 's Twitter Profile Photo

Shino Kouda My tip here is different...

According to Ruby Style Guides:
- 'is' shouldn't be used for function names
- methods that return a boolean should end with a question mark

The template would look like so: ?

ruby-style-guide.shopify.dev

account_circle
Clayton(@claytonlz) 's Twitter Profile Photo

Shino Kouda This habit is reinforced when using Stimulus because of how target names are used in the Stimulus controllers.

@ShinoKouda This habit is reinforced when using Stimulus because of how target names are used in the Stimulus controllers.
account_circle