@@ -25,46 +25,37 @@ Here are some of the things you can do with RailsUrlShortener:
2525
2626## Installation
2727
28- Follow these steps to install and configure RailsUrlShortener:
28+ Follow these steps to install and configure rails_url_shortener in your Rails application.
2929
30- 1 . Add this line to your application's Gemfile:
30+ 1 . Add the Gem
31+ Add the following line to your application's Gemfile:
3132
3233``` ruby
3334gem " rails_url_shortener"
3435```
35-
36- 2 . Install the gem by running :
36+ 2 . Install the Gem
37+ Run the following command to install the gem :
3738
3839``` bash
3940bundle install
4041```
41-
42- 3 . Install and run the migrations:
43-
44- ``` bash
45- bin/rails rails_url_shortener:install:migrations db:migrate
46- ```
47-
48- 4 . Generate the initializer for configuration:
49-
42+ 3 . Run the Generator
43+ Run the generator to set up the necessary files:
5044``` bash
5145rails generate rails_url_shortener
5246```
47+ This will:
48+ ✅ Install and run the required migrations
5349
54- ## Usage
55-
56- 1 . Mount the engine
57-
58- Mount the engine on your app adding the next code on your config/routes.rb:
50+ ✅ Mount the engine
51+ An entry will be added to the bottom of your config/routes.rb file, mounting the engine at the root of your application.
5952
60- ** If you want to mount this on the root of your app, this should be on the bottom of your routes file. **
53+ ✅ Generate an initializer for further configuration`
6154
62- ``` ruby
63- mount RailsUrlShortener ::Engine , at: " /"
6455
65- ```
56+ ## Usage
6657
67- 2 . Generate the short link
58+ 1 . Generate the short link
6859
6960And generate the short links like you want:
7061
@@ -80,7 +71,7 @@ short_url("https://www.github.com/a-chacon/rails-url-shortener")
8071RailsUrlShortener ::Url .generate(" https://www.github.com/a-chacon/rails-url-shortener" )
8172```
8273
83- 3 . Share the short link
74+ 2 . Share the short link
8475
8576** Then share the short link to your users or wherever you want.**
8677
0 commit comments