Skip to content

Commit 032cb54

Browse files
committed
This message contains the re-work of the readme file of ruby on rails with syncfusion schedule.
1 parent 73f03d5 commit 032cb54

4 files changed

Lines changed: 50 additions & 55 deletions

File tree

Output.png

28.9 KB
Loading

README.md

Lines changed: 47 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,140 +2,136 @@
22
howto.md
33
A step-by-step guide to integrate Ruby on Rails with Syncfusion TS Scheduler
44
-->
5-
# How to Integrate Ruby on Rails with Syncfusion TS Scheduler
6-
This repository contains a sample full-stack application demonstrating how to display events in syncfuison TS Scheduler component using Ruby on Rails. The TS frontend provides a responsive UI for viewing and managing calendar events.
5+
## How to Integrate Ruby on Rails with Syncfusion Scheduler
6+
This repository contains a sample full-stack application demonstrating how to display events in syncfuison Scheduler component using Ruby on Rails.
77

88
## Prerequisites
9-
-Ruby - (3.2.2)
10-
-Node JS - (>=18.13.0)
11-
-Yarn - (>=1.22.19)
9+
- Ruby - (3.2.2)
10+
- Node JS - (>=18.13.0)
11+
- Yarn - (>=1.22.19)
1212

1313
## Project Structure
1414
```
1515
├── README.md # This guide
1616
├── postcss.config.js
1717
├── package.json
18-
├── package-lock.json
19-
├── test
20-
│ ├── events_controller_test.rb
18+
├── test #Testing the functionality
19+
│ ├── events_controller_test.rb
2120
│ ├── schedule_controller_test.rb
22-
├── app
23-
│ ├── javascript
21+
├── app
22+
│ ├── javascript #Main JavaScript entry point that initializes frontend behavior
2423
│ │ ├── application.js
2524
│ │ ├── controllers
2625
│ │ │ ├── index.js
2726
└── views
2827
├── layouts
29-
│ ├── application.html.erb
28+
│ ├── application.html.erb #Base HTML layout wrapping all views
3029
└── welcome
31-
└── index.html.erb
30+
└── index.html.erb # View template for the welcome page
3231
```
3332

34-
## Ruby setup
33+
## Project Setup
3534
### Installation
36-
1. ## Ruby setup
35+
1. #### Clone the project
36+
Clone the project from the repository by creating a fork and branch.
37+
2. #### Ruby setup
3738
You can install the Ruby from the following link.
3839
[`https://www.ruby-lang.org/en/downloads/`](https://www.ruby-lang.org/en/downloads/)
39-
2. ## Install Rails
40+
Then Install gem using below commands
4041
```
4142
gem install rails
4243
```
43-
3. ## Install dependencies:
44+
3. #### Install dependencies:
4445
```bash
4546
npm install
46-
```
47-
4. ## Install dependencies:
48-
```bash
47+
or
4948
yarn install
5049
```
51-
## Running the Application
52-
1. Navigate to javascript-scheduler-ruby-rails-application folder
50+
### Running the Application
51+
1. Navigate to javascript-scheduler-ruby-rails-application folder.
5352
```bash
5453
cd javascript-scheduler-ruby-rails-application
5554
```
56-
2. Start the Scheduler FrontEnd
55+
2. Start the Scheduler Frontend
5756
```bash
5857
rails server
5958
```
6059
3. Navigate to `http://localhost:3000` in your browser. (or) Ctrl + click the link in your terminal
6160
6261
63-
## OutputPreview
62+
## Output
6463
![Frontend Preview](./SampleOutput.png)
6564
6665
## Troubleshooting
6766
- **Version error**: Check and install the current version as by prerequistes.
6867
- **Port already in use**: Clear all the previous running applications in both browser and command prompt.
6968
70-
## Rails project creation Setup from the Scratch
69+
## Creating Ruby on Rails Project With Syncfusion Scheduler
7170
72-
## 1. Create your folder.
71+
### 1. Create your folder-directory.
7372
Create a folder with your own application name.
7473
75-
76-
## 2. Create a Directory
7774
Run the below command in your project terminal to create a directory.
7875
```bash
7976
mkdir rails-ts-scheduler
8077
```
8178

82-
## 3. Navigate to your folder.
79+
### 2. Navigate to your folder.
8380
```bash
8481
cd rails-ts-scheduler
8582
```
8683

87-
## 4. Creation of rails Project
84+
### 3. Creation of rails Project
8885
Create a new rails project in your folder using the below command.
8986
```bash
9087
rails new . --webpack --database=sqlite3
9188
```
9289

93-
## 5. Create package.json file
90+
### 4. Create package.json file
9491
To create package.json file use the following command.
9592
```bash
9693
bundle add jsbundling-rails
9794
```
9895

99-
## 6. Add Scripts
96+
### 5. Add Scripts
10097
To add esbuild scripts, app/javascript/application.js use the following command
10198
```bash
10299
rails javascript:install:esbuild
103100
```
104101

105-
## 7. Installation of syncfusion dependencies
102+
### 6. Installation of syncfusion dependencies
106103
Install the syncfusion dependencies by the following commands.
107104
```bash
108-
109-
yarn add @syncfusion/ej2-base
110105
yarn add @syncfusion/ej2-schedule
111-
yarn add @syncfusion/ej2-buttons @syncfusion/ej2-calendars
112-
106+
or
107+
npm add @syncfusion/ej2-schedule
113108
```
109+
### 7. Add CSS styles
110+
Add the Styles in app/javascript/application.js
114111

115-
## 8. Add CSS styles
116-
Add the Styles in app/javascript/application.js.
117-
118-
import the necessary css styles from syncfusion documentatoion from the below link
112+
Import the necessary css styles from syncfusion documentatoion from the below link
119113
```bash
120114
https://ej2.syncfusion.com/documentation/schedule/getting-started
121115

122116
```
123117

124-
## 9. Creation of event models
125-
To Create the event model in your application use the below commands.
118+
### 8. Creation of event models
119+
Create a event folder to save the events in the database.
126120
```bash
127121
rails generate model Event title:string start:datetime end:datetime description:text
128-
rails db:migrate
129-
122+
```
123+
To create a table in the database
124+
```bash
125+
rails db:migrate
130126
```
131127

132-
## 10. Create controller and Routes
133-
To Create Events Controller + Routes use following commands.
128+
### 9. Create controller and Routes
129+
To Create the EventsController, which handles event-related routes and API actions used by the Syncfusion Scheduler.
134130
```bash
135131
rails generate controller Events
136132
```
137133

138-
## 11. Creation of Home folder
134+
### 10. Creation of Home folder
139135
Create the folder Home and index.html
140136
```bash
141137
rails generate controller Home index
@@ -144,11 +140,10 @@ Create the folder Home and index.html
144140
## 12. Update the code in index.html
145141
Update the file app/views/Home/index.html or refer syncfusion documentation for different scheduler
146142
https://ej2.syncfusion.com/documentation/schedule/getting-started
147-
```bash
148-
143+
```bash
149144
<section>
150-
<script src="https://cdn.syncfusion.com/ej2/22.1.38/dist/ej2.min.js" type="text/javascript"></script>
151-
<link href="https://cdn.syncfusion.com/ej2/22.1.38/material.css" rel="stylesheet">
145+
<script src="https://cdn.syncfusion.com/ej2/32.1.24/dist/ej2.min.js" type="text/javascript"></script>
146+
<link href="https://cdn.syncfusion.com/ej2/32.1.24/material.css" rel="stylesheet">
152147
</section>
153148
<section>
154149
<div id="Schedule"></div>
@@ -171,7 +166,7 @@ Update the file app/views/Home/index.html or refer syncfusion documentation for
171166
</section>
172167
```
173168

174-
## 13.Run the application
169+
### 13.Run the application
175170
Run the application using the following command.
176171
```bash
177172
rails server

app/views/welcome/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<section>
2-
<script src="https://cdn.syncfusion.com/ej2/22.1.38/dist/ej2.min.js" type="text/javascript"></script>
3-
<link href="https://cdn.syncfusion.com/ej2/22.1.38/material.css" rel="stylesheet">
2+
<script src="https://cdn.syncfusion.com/ej2/32.1.24/dist/ej2.min.js" type="text/javascript"></script>
3+
<link href="https://cdn.syncfusion.com/ej2/32.1.24/material.css" rel="stylesheet">
44
</section>
55
<section>
66
<div id="Schedule"></div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"@rails/webpacker": "5.4.4",
4-
"@syncfusion/ej2-schedule": "^32.1.22",
4+
"@syncfusion/ej2-schedule": "*",
55
"webpack": "^5.104.1",
66
"webpack-cli": "^6.0.1"
77
},

0 commit comments

Comments
 (0)