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 503965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:26:53+00:00 2026-05-13T06:26:53+00:00

i want to implement a digg-like vote up/down method in my rails application using

  • 0

i want to implement a digg-like vote up/down method in my rails application using ajax. and i found that link_to_remote can do just that. but i want to check whether there’s already a vote by the current user so that no user can vote up twice or more. how can i do that – how can i return values based on some condition so that an forbidden vote action triggers link_to_remote :failure condition??

  • 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-13T06:26:53+00:00Added an answer on May 13, 2026 at 6:26 am

    You need to set the HTTP status code appropriately (not in the 200 range, you probably want 403 (forbidden, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) unless you handle that separately in your app — it doesn’t really matter what the code is, just that it’s not in 200 range).

    To set the status code, in your render line, you add

    :status => 403
    

    It seems like you are all set for the rest of this (i.e., specifying and implementing the failure condition, etc. etc.)

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

Sidebar

Related Questions

I want to implement login using facebook in my windows phone 7.1 application When
I want implement a program that can do a a Vision-based Page Segmentation. I
I wrote small service class and I want implement something like that : service
I want to implement email application which has all options like inbox,compose,drafts and etc.
I want to implement a splash screen in my application, like if the username
I want to implement chat functionality in iPhone application. Please suggest me. Can we
I want to implement a WPF CustomControl, that... Normally looks like a button and
I want implement multiple languages in my program. I'm using an xml file like
Microsoft has announce that WindowsLiveID become a OpenID provider . I want implement it
I want to implement an application which will work as a parser. User will

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.