Hacker News new | ask | show | jobs
by imhoguy 2228 days ago
When my small SaaS customer calls and asks for an extra extension at current hard times, then all I need is to open up Rails production console (pry) and live type in an ad-hoc code with auto-completion aid:

    $ rails c
    Loading production environment (Rails 5.2.0)
    [1] pry(main)> s = Subscriber.find_by_email('xyz@abc.com')
    => #<Subscriber:0x000055dbb64c3bb8
     id: 12913,
     email: "xyz@abc.com",
     state: "active",
     expires_on: Fri, 15 May 2020 14:10:19 UTC +00:00,
     ...
    [2] pry(main)> s.expires_on += 2.months
    => Wed, 15 Jul 2020 14:10:19 UTC +00:00
    [3] pry(main)> s.save!
    => true
It is done now! Good luck! Bye! - end of call.

Cargo culting? From whom? I don't give a sh*.

1 comments

I can do the same with Elixir's Phoenix, with exactly 3 lines in a production console like in your example.

What you describe is not exclusive to Rails.

Yeah, maybe I should rewrite one day, but customers wouldn't care much and I am content wit Ruby.
That's fair. Nobody is making you do it. Use what feels right to you.

I simply felt compelled to point out that Rails is not at all as unique as many of its long-time users believe.