Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3987344
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:07:21+00:00 2026-05-20T06:07:21+00:00

I want rails to either update or store the Comment after a user did

  • 0

I want rails to either update or store the Comment after a user did a successfull loging trough omniauth (Twitter, Facebook or OpenID).

  1. A (not logged in) user fills in a comment form. Posts that.
  2. User gets an omniauth page where she can choose the sign-in-method: Twitter, Facebook or OpenID.
  3. Once the user returns from the oAuth successfully, I want to store (or publish) the Comment.

I have this working, using a session-variable, but that is not very thread-safe: it will break if a user has multiple comment-tabs open with the same session.

Should I save the comment to the database in an unpublished state, and toggle that after returning? And if so, how to know how to toggle te correct comment? Problem is similar to abovementioned session-issue.

Is there some way to simply pass the comment-object along with the omniauth and recieve it back when the user returns from a successfull sign-in?

Or can I pass some hash-string along that I can extract after a successfull return?

Edit: complete rewrite to simplify and clarify the question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:07:21+00:00Added an answer on May 20, 2026 at 6:07 am

    Store post id along with comment text in session. On successful authentication, find the post using stored id and build the comment object for it.

    Update – In case authentication fails, delete all such entries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to accomplish the same thing Rails has done, to store configurations in
I am building a website in either Rails or DJango, and I also want
In rails I want to log some information in a different log file and
I have a site in rails and want to have site-wide settings. One part
In a blog in Rails I want to have paths like http://mydomain.com/posts/28383/comments#21 This is
I want to create my Rails application with MySQL, because I like it so
I want to create a Rails (2.1 and 2.2) model with ActiveRecord validations, but
I want to setup a rails app on heroku that is part of a
In my Rails controller I want to branch to a different controller's action, show
In my Rails app I want users to be able to input video links

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.