Answer the question
In order to leave comments, you need to log in
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
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
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question