rao-resources_controller 0.0.12.pre → 0.0.13.pre

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
- SHA1:
3
- metadata.gz: b127f4fcb7beb3d8258a6d934bb38aa3c63641e8
4
- data.tar.gz: eca4b16054e99afa518b8867b5f0a51d7ce994d8
2
+ SHA256:
3
+ metadata.gz: ba8306731f961a258cb7386222212040eeff74c0e21381ef11c3b63af05a2ccb
4
+ data.tar.gz: 908880b4ce3166d83600c87b5aa88103c25178f283fe8806f904ac8ccb3f3b57
5
5
  SHA512:
6
- metadata.gz: 779960759e6ee8a4f5c6db3e0be9df1e1df332217762809a4f8b7e3980bd7748325f19f80a9e37aba67515b40abffabb3f793bad45d4fcdc264a44fcf9494cf4
7
- data.tar.gz: 8c9a6936dc576538d4ab8fca63abb18325d05878f8f7b0b5e08d87ecbbe71fc03523f60e0ee9f61610493b65ee549ad92911723796ba81b9e9196d885fac5c17
6
+ metadata.gz: 3d9534e828c58922739946791fb462ed66721ee557a036037358cf0ec9b2245feb7d9baff36b05e8435d0aa8a4a72f1c7f77c5005b1e53b6543b02382ee27810
7
+ data.tar.gz: 51538323e4d3d064f00fbd10e51198594b4091c81097372afced77a458a1b57d9d56ab9bc9db38a6c7dd79e6b817d7b11eeb75e1d60618da800ebdf82d13d1ad
@@ -17,7 +17,7 @@ module Rao
17
17
  def store_location
18
18
  return if request.referer.nil?
19
19
  truncate_location_history(9)
20
- puts "[LocationHistoryConcern] Storing last location [#{request.referer}]"
20
+ logger.debug "[LocationHistoryConcern] Storing last location [#{request.referer}]"
21
21
  location_history[Time.zone.now] = request.referer
22
22
  end
23
23
 
@@ -5,6 +5,7 @@ module Rao
5
5
  included do
6
6
  include ActionController::MimeResponds
7
7
 
8
+ ensure_responders_available!
8
9
  respond_to :html
9
10
  responders :flash
10
11
 
@@ -22,6 +23,14 @@ module Rao
22
23
  end
23
24
  end
24
25
 
26
+ class_methods do
27
+ def ensure_responders_available!
28
+ unless respond_to?(:respond_to)
29
+ raise NoMethodError.new("undefined method 'respond_to' for #{self.name}:Class. If you are running Rails >= 4.2 you have to add the responders gem to you Gemfile.")
30
+ end
31
+ end
32
+ end
33
+
25
34
  def index; end
26
35
  def new; end
27
36
  def show; end
@@ -5,7 +5,7 @@
5
5
 
6
6
  = bootstrap_button(to: resource_path(resource), context: :danger, method: :delete, data: { confirm: 'Are you sure?' }) do
7
7
  = fa_icon :trash
8
- = t('.delete')
8
+ = t('.destroy')
9
9
 
10
10
  = bootstrap_button(to: collection_path, context: :link) do
11
11
  = t('.back')
@@ -9,4 +9,4 @@
9
9
  = t('.edit')
10
10
  = bootstrap_button(to: resource_path(resource), context: :danger, size: :small, method: :delete, data: { confirm: 'Are you sure?' }) do
11
11
  = fa_icon :trash
12
- = t('.delete')
12
+ = t('.destroy')
@@ -7,3 +7,5 @@ module Rao
7
7
  extend Configuration
8
8
  end
9
9
  end
10
+
11
+ Rao.configure { |c| c.register_configuration(:resources_controller, Rao::ResourcesController) }
@@ -1,2 +1,3 @@
1
1
  require "rao"
2
+
2
3
  require "rao/resources_controller"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-resources_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12.pre
4
+ version: 0.0.13.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2019-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rao
@@ -150,8 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: 1.3.1
152
152
  requirements: []
153
- rubyforge_project:
154
- rubygems_version: 2.6.14
153
+ rubygems_version: 3.0.2
155
154
  signing_key:
156
155
  specification_version: 4
157
156
  summary: Resources Controllers for Ruby on Rails.