M
M
Max2015-05-13 18:13:32
JavaScript
Max, 2015-05-13 18:13:32

How to implement a popup window in Rails?

Hello, please tell me how to make a popup window in Rails.
The task is this: there is a page that displays all products with buttons new, edit, show and delete. It is necessary that when you click on the "new" button, a pop-up window opens with a form for adding a new product.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Penzin, 2015-05-13
@maxprof

The easiest way: connect the module for windows, or bootstrap right away. You write the necessary paths in the assetsets for js and css. Then just call and create them. This is the second stupid question from you. I recommend that you first carefully read the guides on the rails, so as not to confuse warm with soft. Rails is a framework for the back-end, it is deeply and strongly violet, what and how you have on the front-end, as long as you use the technology stack that is allowed for it. By default, HTML, CSS, SCSS, JS, CoffeeScript are available on the front.
UPD: you have layouts: application and others that you make yourself. They have layout_name.css and layout_name.js. In them you must include plugins. Plugins should be in their respective assets(stylesheets or javascripts or images). For some things, there are immediately assembled gems, which are even easier to connect. For bootstrap, definitely.
Plugins are best placed in separate folders and add a line for them:

*= require_tree ./путь_к_директории_плагина в css
//= require_tree ./путь_к_директории_плагина в js
.

D
D', 2015-05-13
@Denormalization

What about rails?
You need to read about js + css and take any modal window plugin. The same Lightbox for pictures. Or like here https://www.youtube.com/watch?v=5huBlLhywJg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question