Skip to content

Commit

Permalink
chore(readme): update README
Browse files Browse the repository at this point in the history
- include forkception
- add specs requirements
  • Loading branch information
bivanalhar committed Jun 6, 2024
1 parent a27bb1c commit a7ee467
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
Rails helpers based on opinionated project practices. Useful for structuring CSS and JavaScript,
display title of the page, and flash messages with Bootstrap.

## Forkception

This repo is a fork of:

- The [fonglh](https://github.com/fonglh/rails_utils) gem
- which is the fork of the original gem maintained by [Winston](https://github.com/winston/rails_utils)

## Requirements

- Ruby >= 3.0, <= 3.2
- Rails >= 6.0, <= 7.1

The library might work for the higher version, however it's only tested for the specs mentioned above.

## Installation

Add rails_utils to your application's Gemfile:
Expand Down Expand Up @@ -36,7 +50,7 @@ you can use `page_class` to include the controller name and action name as CSS c
becomes

```html
<body class='animes show'>
<body class="animes show">
...
</body>
```
Expand Down Expand Up @@ -79,9 +93,7 @@ When controller and action is `animes#show` you can easily use `page_title` like
becomes

```html
<div class="page-title">
Animes Show
</div>
<div class="page-title">Animes Show</div>
```

Besides, it supports I18n and interpolation:
Expand All @@ -104,9 +116,7 @@ Pass in `anime_name`:
becomes

```html
<div class="page-title">
Showing anime of: Frozen
</div>
<div class="page-title">Showing anime of: Frozen</div>
```

### #`javascript_initialization`
Expand All @@ -130,13 +140,17 @@ compiles to:

```html
<script type="text/javascript">
//<![CDATA[
MyApp.init();
if(MyApp.animes) {
if(MyApp.animes.init) { MyApp.animes.init(); }
if(MyApp.animes.show && MyApp.animes.show.init) { MyApp.animes.show.init(); }
}
//]]>
//<![CDATA[
MyApp.init();
if (MyApp.animes) {
if (MyApp.animes.init) {
MyApp.animes.init();
}
if (MyApp.animes.show && MyApp.animes.show.init) {
MyApp.animes.show.init();
}
}
//]]>
</script>
```

Expand Down Expand Up @@ -196,16 +210,13 @@ Minitest-ed. To run all tests, just run `rake` or `rake test`.

## Author

Rails Utils is maintained by [Winston Teo](mailto:[email protected]).
Rails Utils is originally maintained by [Winston Teo](mailto:[email protected]).

[You should follow Winston on Twitter](https://www.twitter.com/winstonyw), or find out more on [WinstonYW](http://www.winstonyw.com) and [LinkedIn](http://sg.linkedin.com/in/winstonyw).

## License

Copyright © 2013-2016 Winston Teo Yong Wei. Free software, released under the MIT license.


[version-badge]: https://badge.fury.io/rb/rails_utils.svg
[rubygems]: https://rubygems.org/gems/rails_utils
[travis-badge]: https://travis-ci.org/winston/rails_utils.svg
[travis]: https://travis-ci.org/winston/rails_utils

0 comments on commit a7ee467

Please sign in to comment.