Veritula – Meta

Showing only those parts of the discussion which lead to #2670 and its comments.

See full discussion·See most recent related ideas
  Log in or sign up to participate in this discussion.
With an account, you can revise, criticize, and comment on ideas.

Discussions can branch out indefinitely. Zoom out for the bird’s-eye view.
Dennis Hackethal’s avatar
Dennis HackethalOP revised 5 days ago·#2630
Only version leading to #2670 (2 total)

Discussions are getting slower to render as they grow. It’s a rendering issue (not a db issue).

Criticism
Dennis Hackethal’s avatar
Dennis HackethalOP revised 3 days ago·#2659
Only version leading to #2670 (2 total)

I could use ActionController::Live to stream top-level ideas to the page one by one. Instant page load.

Dennis Hackethal’s avatar

Incompatible with Devise authentication: https://github.com/heartcombo/devise/issues/2332

Criticism of #2659Criticized1oustanding criticism
Dennis Hackethal’s avatar
Dennis HackethalOP revised 2 days ago·#2688

The thread suggests a workaround: use authenticated do … blocks in routes.rb instead of before_action :authenticate_user! in controllers.

It’s probably a good idea to do this anyway to avoid divulging the existence of routes that unauthenticated users don’t need to know exist. (They will get a 404 instead of a 401.)

Criticism of #2670Criticized1oustanding criticism
Dennis Hackethal’s avatar

Then again, I’d want to redirect users to the sign-in page (and then ideally back to where they were trying to go).

Criticism of #2688
Dennis Hackethal’s avatar

I could extract discussions#show into a new, separate StreamController or something like it. That controller would not use Devise.

Criticism of #2670
Dennis Hackethal’s avatar

I could override authenticate_user! in the DiscussionsController.

Criticism of #2670Criticized1oustanding criticism
Dennis Hackethal’s avatar

That means duplicate functionality; anytime I customize Devise in the future, I’ll have to remember to adjust this one method as well.

Criticism of #2692