anyone know of any issues using a link_to_remote to change the state of the database? I'm taking about issues with spiders, google accelerator etc. Twitter seems to do it with no problem. Thanks
Issues using a link_to_remote to change the state of the database?
160 Views Asked by dangerousdave At
2
There are 2 best solutions below
1
dangerousdave
On
I'll try to elaborate. I understand its dangerous to have a html link change the state of the database, for example, delete an article. If a spider follows that link, or a tool such as google accelerator follows that link, then the article will be unintentially deleted.
I was wondering if these problems also exist for a link_to_remote link. Twitter uses an ajax link to add or delete searches, and i was wondering why the issues i mention above were not a problem for them.
Related Questions in RUBY-ON-RAILS
- Rails HABTM: Select everything a that a record 'has'
- Best way to make an HABTM association via console
- dynamically create an ical / ics file from a rails model
- Ruby destroy is not working? Or objects still present?
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Select results where joined table contains records with an attribute, but without another
- Showing posts only created when boolean was true
- Ruby on rails and HAML - Print a hash with background color
- How can I monitor an endpoint's status with Ruby?
- How to create dynamic pages without form_for helper in Rails?
- Rails 4.2 jQuery loads only after refresh
- "Access Denied" - User's Permissions to S3 Bucket
- ActiveRecord, Rails 4: has_many :through with scoped conditions failure
- Rails - formatting a list of options
- Rails - Ajax do not work properly on production server
Related Questions in AJAX
- Ajax jQuery firing multiple time display event for the same result
- Implement Onfailure in webApi controller
- AJAX PHP - Reload div after submit
- ajax load data from mysql
- Ajax-update only a component attribute, not the whole component nor its children
- using ajax to get a php database result and then show the result in a button
- How to prevent browser from executing some JavaScript when person clicks Back button?
- ajax async: true statement execution order
- Rails 4.2 jQuery loads only after refresh
- WebForms GET Json requests (JsonRequestBehavior.AllowGet)
- Rails - Ajax do not work properly on production server
- Angular js Button click
- Make jQuery/AJAX perform instantly on page load
- jQuery Ajax Uncaught TypeError: Cannot use 'in' operator to search
- Show success or error messages in Ajax response to Wordpress custom registration form
Related Questions in RJS
- RJS and Observer for Showing/Hiding a DIV
- How to access view helpers from RJS helpers in Ruby on Rails?
- What's wrong with my Ruby on Rails code?
- Ajax flash message in ruby on rails
- how to pass ruby instance variable as params to js function in a rjs page
- Eliminating need for require js from optimized app
- RoR - image with link, error showing the ID in the url-for but not in the image_tag?
- link_to_function does not react to click in rails 3.1.0 & simple_form
- How to convert content of .js.rjs to .js.erb in rails
- resource to learn using RJS in Ruby On Rails
- Multiple dependent dynamic select boxes in form
- RJS error "object doesn't support this property " on element update
- How to Convert RJS Template to Coffeescript?
- Convert rjs to js.erb in rails 3.1
- Loading data from database by Ajax - Ruby on Rails app
Related Questions in LINK-TO-REMOTE
- Why does adding ":remote => true" cause my file download not to launch?
- Rails passing a list of objects to another controller with link_to_remote
- Symfony confirm message if a condition is true (submit_to_remote)
- render :update on Rails 3.1.0 gives me Missing Template update
- Callback after Rails link with data-remote="true" and data-method="PUT"
- Missing template after link_to_remote
- conditional :confirm in link_to_remote
- rails link_to creates unwanted confirmation message in firefox and does not work in safari
- Element.update rjs error while using link_to_remote in rails
- Rails3 - How to send Javascript Variable to a controller's action with the link_to helper?
- click link on bottom of the page taking to top of the page
- Issues using a link_to_remote to change the state of the database?
- Is there a :disable_with equivalent for link_to_remote?
- link_to_remote in rails, problem pass :id
- why after returning from link_to :remote => true the entire form is submitted?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Generally anything engaged only with JavaScript or using a non-GET method is safe from this sort of thing. Rails also has a special field send with each POST to ensure that the form was generated by the application and not a third-party site.
This is why in Rails 2.x the destroy methods require DELETE to be routed properly. Prior to this there were GET-based destroy calls with a slightly different path and that created the exact problems you are describing.