# Save info to database when user clicks on button or link

**URL:** <https://www.ruby-forum.com/t/save-info-to-database-when-user-clicks-on-button-or-link/107351>\
**Category:** Rails\
**Created:** [June 20, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/save-info-to-database-when-user-clicks-on-button-or-link/107351 "2007-06-20T20:20:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 20, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/save-info-to-database-when-user-clicks-on-button-or-link/107351/1 "2007-06-20T20:20:51Z")

</div>

I’m working on a web app where users can record a video from their  
webcam using flash.

They click record, then view… after clicking view they can playback  
the video they just recorded in the browser. At this point I want the  
user to be able to reject the video and not have its information saved  
in the database, or click accept and have the videos info stored in the  
database.

What do you use in ruby to execute a certain code block when a button or  
link is clicked.

Thanks a lot.
