Questions about javascript in Rails

Asked

Viewed 16 times

0

I would like to know a few points about Rails:

When I’m in a populated post view and decide to quit it, how to issue an alert warning that I might lose these changes?

It is possible to display a deleted post, or it is possible to insert which will be marked as deleted but which will still be present in the database?

You can display an alert when a post with the same title already exists?

It is possible that some fields appear in the edit view but do not appear in the new post creation view, as both are part of the same form?

_html form.

  • Friend, I understand that your doubts are related to the same theme, but so many questions in one only makes it difficult to send a solution. I can say that: (1) the alert is possible, you can see something similar here: https://answall.com/questions/87290/questiona-se-o-usu%C3%A1rio-even-want-to-leave-the-p%C3%A1gina (2 and 3) It is possible, I would implement with a little AJAX. (4) This you can resolve in the Rails itself by checking if your entity already exists, and making ifs simple. I suggest you rephrase in smaller questions. !

  • Thank you, Romulo. I will test and anything I come back here.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.