# Rails

## Required Libraries

| PLUGIN              | DESCRIPTION                                   | DEP. STATUS  |
| ------------------- | --------------------------------------------- | ------------ |
| jquery.js           | Core JS Library                               | **REQUIRED** |
| mordnerizer.js      | Browser Feature Detection                     | **REQUIRED** |
| bootstrap.js        | Core Framework                                | **REQUIRED** |
| pace.js             | Page Progress Loader                          | **OPTIONAL** |
| jquery-unviel.js    | Library Used for displaying retina images     | **OPTIONAL** |
| jquery.ioslist.js   | Used Chat list on the quickview               | **OPTIONAL** |
| jquery.actual.js    | Determine image dimentions                    | **OPTIONAL** |
| jquery.scrollbar.js | Scrollbar plugin used in sidebar and portlets | **OPTIONAL** |

Add the following dependencies in your **package.json**. Inside "**dependencies**" object

```javascript
"jquery": "^3.4.1",
"bootstrap":"4.3.1",
"modernizr":"3.10.0",
"pace-js":"1.0.2",
"jquery-unveil":"1.3.2",
"jquery.actual":"1.0.19",
"jquery.scrollbar":"0.2.11",
"popper.js":"^1.16.0",
"pages-core": "git+https://github.com/revoxltd/pages-core.git"
```

Run the command to install the dependencies to your project

```ruby
yarn install
```

Import the libraries to webpack by adding it to the following file\
**config/webpack/environment.js**&#x20;

```ruby
const { environment } = require('@rails/webpacker')

module.exports = environment

environment.plugins.prepend('Provide',
  new webpack.ProvidePlugin({
    $: 'jquery/src/jquery',
    jQuery: 'jquery/src/jquery',
    Popper: ['popper.js', 'default']
  })
)
```

Update `config/webpacker.yml` to be able to resolve assets stored in the `app/assets` folder.

```ruby
resolved_paths: ['app/assets']
```

Import css/scss dependencies into our main webpack `application.scss` : in app/assets/stylesheets

```ruby
 @import "bootstrap/scss/bootstrap";
 @import "pages-core/dist/scss/pages"
```

Thats it! you can use the pages layouts mentioned below

{% content-ref url="/pages/-LDC2HxOSX6DIHvxviyq" %}
[Layouts](/introduction/layouts.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pages.revox.io/other/rails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
