{"id":14955828,"url":"https://github.com/mkhairi/alertifyjs-rails","last_synced_at":"2025-10-08T18:29:56.506Z","repository":{"id":20932591,"uuid":"24220809","full_name":"mkhairi/alertifyjs-rails","owner":"mkhairi","description":"AlertifyJS as gem for rails asset pipeline","archived":false,"fork":false,"pushed_at":"2019-10-15T03:02:40.000Z","size":149,"stargazers_count":23,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T11:47:35.899Z","etag":null,"topics":["alert","alertify","confirm-dialog","flash-messages","notice","rails","rubygem","rubyonrails"],"latest_commit_sha":null,"homepage":"http://www.alertifyjs.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkhairi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-19T07:38:09.000Z","updated_at":"2023-12-21T13:51:51.000Z","dependencies_parsed_at":"2022-08-17T16:01:23.954Z","dependency_job_id":null,"html_url":"https://github.com/mkhairi/alertifyjs-rails","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkhairi%2Falertifyjs-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkhairi%2Falertifyjs-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkhairi%2Falertifyjs-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkhairi%2Falertifyjs-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkhairi","download_url":"https://codeload.github.com/mkhairi/alertifyjs-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235515428,"owners_count":19002481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alert","alertify","confirm-dialog","flash-messages","notice","rails","rubygem","rubyonrails"],"created_at":"2024-09-24T13:11:52.246Z","updated_at":"2025-10-06T08:31:59.380Z","avatar_url":"https://github.com/mkhairi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alertifyjs-rails [![Gem Version](https://badge.fury.io/rb/alertifyjs-rails.svg)](http://badge.fury.io/rb/alertifyjs-rails)\n\nThis gem provides [alertify.js](http://alertifyjs.com/) for Rails.\n\n\n## Installation\n\nIn your Gemfile:\n\n```ruby\ngem 'alertifyjs-rails'\n```\n\nor system wide:\n\n```console\n$ gem install alertifyjs-rails\n```\n\n\n## Usage\n\nThe alertify files will be added to the asset pipeline and available for you to use. Add the following line to `app/assets/javascripts/application.js`\n\n```javascript\n//= require alertify\n```\n\nOptional js(coffe script) replace browser confirm dialog\n\n* if you use jquery-ujs\n```javascript\n//= require alertify/confirm-modal\n```\n\n* if you use rails-ujs (default rails 5)\n```javascript\n//= require alertify/confirm-ujs\n```\n\n\nIn order to get the CSS, add the following line to `app/assets/stylesheets/application.css`\n\n```css\n/*\n *= require alertify\n *= require alertify/default\n *= require alertify/bootstrap\n */\n```\n\nor if you using scss `app/assets/stylesheets/application.scss`\n\n```scss\n @import \"alertify\";\n @import \"alertify/default\";\n @import \"alertify/bootstrap\";\n```\n\nflash helper, add the following line in layout\n\n```html \n\u003chead\u003e\n\u003c%= alertify_flash %\u003e\n\u003c/head\u003e\n```\n\nor with wait timeout option\n\n```html \n\u003chead\u003e\n\u003c%= alertify_flash(wait: 20) %\u003e\n\u003c/head\u003e\n```\n\nor in your js request format\n```js\n\u003c%= alertify_flash_now %\u003e\n````\n\n**notes\nThe default content security policy for Rails 5.2 blocked the functionality of this flash helper. An initial workaround is to add :unsafe_inline as an option to the policy.script_src in development \n\n```ruby\npolicy.script_src  :self, :https, :unsafe_inline\n\n```\n\n\n\nMore option? read  [alertify.js](http://alertifyjs.com/) documentation [here](http://alertifyjs.com/) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkhairi%2Falertifyjs-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkhairi%2Falertifyjs-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkhairi%2Falertifyjs-rails/lists"}