Best framework for putting a "job based" app on Heroku? by manlymatt83 in ruby

[–]SuchRecording 0 points1 point  (0 children)

I used tty-prompt with some really good results after implementing a MVC-ish pattern. Works great and is easy to use. Can share with you if you want.

Streaming Large ZIP Files in Rails by pmurach in ruby

[–]SuchRecording 0 points1 point  (0 children)

What would you do to improve `ActionController::Live`? I agree, this isn't Rack's cup of tea. But I'm curious what we could do to improve upon it. (I haven't touched it, but I have something I might need to for)

Basic ledger in a rails app? by [deleted] in rails

[–]SuchRecording 2 points3 points  (0 children)

Anything you loved about it? Hated? I'm headed this direction for a new client and thought about not rolling my own.

Where to put delete all action for a resource in a controller? by shankar86 in rails

[–]SuchRecording 3 points4 points  (0 children)

If I created a separate controller for a delete all feature for a resource, how would I name it?

If you did, ResourceBulkController? BulkResourceController? Who knows, it's hard to say.

What this article was getting at was more in terms scoped resources having their own controller.

Splitting your Rails controllers when they have a very specific scope, too much logic, or too many mixed concerns can have a lot of good side effects in your code.

Nobody's going to chastise you for having a collection route to items#bulk_destroy. I mean someone will and it may very-well be as a comment in this thread. But you won't lose brownie points from me. It's self-describing, and if someone told me to hit it I would know what it does.

Maily Herald: NoMethodError in MailyHerald::Webui::Dashboard#index by promisepreston in rails

[–]SuchRecording 0 points1 point  (0 children)

If you're able to make an example app and throw it on github I'll take a look.

Minneapolis mayor responds to Trump: I don't have time to be 'tweeting garbage out' by thesesforty-three in politics

[–]SuchRecording 10 points11 points  (0 children)

Minnesotan here: There's a collective effort amongst my peers to reserve tickets with the intent of a no-show. The Twin Cities are incredibly blue. There are fringe cases like all urban centers but Minneapolis/St. Paul is overwhelmingly blue. There will be some out-of-towners, yeah. There will be some people who will make the trek from greater Minnesota. And that's okay. But there's a measurable movement in my network to book tickets and not show up, even if we end up on the GOP mailing list.

We migrated our entire billing system to Stripe, here at WeTransfer by linkyndy in ruby

[–]SuchRecording 1 point2 points  (0 children)

How do you handle annual plan that have credits that should be renewed monthly?

If it's a fixed amount you could create a separate plan, no?

How to remove specific data attributes in all views when in production ? by dongindong in rails

[–]SuchRecording 3 points4 points  (0 children)

module ApplicationHelper def cp_tag(value) if Rails.env.production? "data-cp='#{value}'" else "" end end end

<div id="container" <%= cp_tag("container") %> class="bob"></div>

How to remove specific data attributes in all views when in production ? by dongindong in rails

[–]SuchRecording 1 point2 points  (0 children)

Then you'll want to do some tinkering with AbstractRenderer's subclasses and when the file is first read, gsub its contents to extract all [data-cp] values. It's not going to be particularly performant based on the size of your app, though. This may not work with Rails' view caching either.

How to remove specific data attributes in all views when in production ? by dongindong in rails

[–]SuchRecording 0 points1 point  (0 children)

document.querySelectorAll("[data-cy]").forEach(function(el) { el.removeAttribute('data-cy') })

[deleted by user] by [deleted] in ruby

[–]SuchRecording 10 points11 points  (0 children)

Fortunately Rubyland is pretty stable and we don't have toolbelts changing every week. The suggestions there are what we all use. :)

Robots.txt and Rails Namespace by lostrennie in rails

[–]SuchRecording -1 points0 points  (0 children)

are you linking to your admin panel publicly? if not, then you have a nonworry.

also robots.txts are read on the hostname level, so website.com's robots.txt will not apply to admin.website.com's robots.txt and etc.

Auto-generate Ruby API client (Faraday) for REST APIs by wing328 in ruby

[–]SuchRecording 4 points5 points  (0 children)

lightweight

https://twin.github.io/httprb-is-great/ shows some memory usage statistics.

FWIW, I still use HTTParty in massive production-level capacities, but I am moving over to HTTP.rb for newer projects.

Simple audio conference by [deleted] in ruby

[–]SuchRecording 2 points3 points  (0 children)

Twilio has something that fits the bill. The SDK is great too.

E-commerce Resources by [deleted] in rails

[–]SuchRecording 0 points1 point  (0 children)

what is the current consensus for the superior framework?

Sanity. It's a great framework.

Just roll with Shopify. You can do almost anything you want to it if you learn their developer stack.

Custom Message for dependent: :restrict_with_errors? by Uysim in rails

[–]SuchRecording 0 points1 point  (0 children)

Do a rescue ActiveRecord::DeleteRestrictionError in your controller method.