remote_bootstrap_modal 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33feab5946f4216426bf5461104152fc6caff364
4
- data.tar.gz: '0397502932e215ccc5a90598c3c9619ac5c3dd89'
3
+ metadata.gz: de3ae4437a9b8eda5f1f841f1efe1877761fbff8
4
+ data.tar.gz: 7181af24bd5498a507b987d5f022ec4ffb6f6a81
5
5
  SHA512:
6
- metadata.gz: 66f5bd0f16f08da8e199ef05ff5024032e1c093c34c8b35bc0737f8d8a2b7ae490e37802d932bb1dd2ae4ccf23af5bdfb41788f416e8f7be685acab09d2a63bd
7
- data.tar.gz: f672a062917ed95ddb525e4f6031dc1eb09b32b16ddeaa1c953e56b07ffd00ecb8efd4e1af781888f20b51953e77cb996123d4be8991cb784ca7666f1db50ed9
6
+ metadata.gz: e69699ab100e6f1f30da137580a08cc22c5e897c16a482e895c2088919325ac433e0a01c38a2aac563a075e29aebf6c130c04f0b85fc58ddb0abd053347cb8ca
7
+ data.tar.gz: 91e8aa08964eca6e9742d80a538c871e6a548f4818d42121c78868cac3315f4b6af5b31771f49273ba05f23ac148f5e66aa942838d47d447a3038dd32a29428e
data/README.md CHANGED
@@ -30,11 +30,10 @@ $ gem install remote_bootstrap_modal
30
30
  1. Make sure you have bootstrap in your application
31
31
  2. Add this gem to your Gemfile
32
32
  3. Add the following div `<div id="modal-holder"></div>` to your application layout (the modal will be rendered inside it)
33
- 4. Add `//= require remote_bootstrap_modal/modal.js` to your `app/assets/javascripts/application.js` (after jquery)
34
- 5. Add `include RemoteBootstrapModal::Responder` to your `ApplicationController`
35
- 6. Set the formats you need to respond with `respond_to` (ex: `respond_to :html, :json`)
36
- 7. Call `respond_modal_with` in your controller passing the arguments you need
37
- 8. Pass `data: { modal: true }` to links you want to load into a modal (ex: `link_to 'Customers', customers_path, class: 'btn btn-default', data: { modal: true }`)
33
+ 4. Add `//= require remote_bootstrap_modal` to your `app/assets/javascripts/application.js` (after jquery)
34
+ 5. Set the formats you need to respond with `respond_to` (ex: `respond_to :html, :json`)
35
+ 6. Call `respond_modal_with` in your controller passing the arguments you need
36
+ 7. Pass `data: { modal: true }` to links you want to load into a modal (ex: `link_to 'Customers', customers_path, class: 'btn btn-default', data: { modal: true }`)
38
37
 
39
38
  ## Customization
40
39
 
@@ -1,5 +1,9 @@
1
1
  module RemoteBootstrapModal
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace RemoteBootstrapModal
4
+
5
+ initializer "remote_bootstrap_modal.load_responder" do |app|
6
+ ActionController::Base.send :include, RemoteBootstrapModal::Responder
7
+ end
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module RemoteBootstrapModal
2
- VERSION = '0.0.1'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_bootstrap_modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glauco Custódio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-26 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: responders
@@ -36,8 +36,7 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - app/assets/config/remote_bootstrap_modal_manifest.js
39
- - app/assets/javascripts/remote_bootstrap_modal/application.js
40
- - app/assets/javascripts/remote_bootstrap_modal/modal.js
39
+ - app/assets/javascripts/remote_bootstrap_modal/index.js
41
40
  - app/assets/stylesheets/remote_bootstrap_modal/application.css
42
41
  - app/controllers/concerns/remote_bootstrap_modal/responder.rb
43
42
  - app/controllers/remote_bootstrap_modal/application_controller.rb
@@ -1,15 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require rails-ujs
14
- //= require activestorage
15
- //= require_tree .