gridy 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66c0d42e946cb8ceafe4a111a998494c955f4a9a035c903d0d0027744679323e
4
- data.tar.gz: 6527df2efdc6bf95009558ae508fcfcd9970ea7185add0ff32244b84b3c2d919
3
+ metadata.gz: 97a7d64bf7b70ef799b8c55b752cf0df7a3ca99fdbc3b663ab5447f022532f4f
4
+ data.tar.gz: 28e986f95315aafb56dee5f065cb0862650060483251a5340d4b10420d518827
5
5
  SHA512:
6
- metadata.gz: 44e0062d0aafa320326cf7904f7d699a164f6e4622780d5cb78ec455d20e5d9fae89ef59a062225de5e17b17675469572ac725d93bdd02e7f7c5ead7d01fadfa
7
- data.tar.gz: 2a0ce19b7cecd8ff8b7b44dbbc4ae1b5e0f2bc83bcbc2076531812e277d0cff294493cd69f6c7958501d8b095b090c852df2ad1fe5c9f05bc1b8629fa6424ed4
6
+ metadata.gz: d87e1151f639a02a00c7b6c4451d5f09b68f1c67268ddeb6adcb86c6d6fb1609ca115bf55152a302f621fafa44f6849bcc593e78dddb78e38c13fafb96b7d802
7
+ data.tar.gz: dd6ad47a3cf461dc215c00956bc268f6d69c1c9b275c978143d6cf7be751054a2e41559e381a659ac88a76b38d7e0973ceab6d861ca13c2d0e09b440c885d195
@@ -7,6 +7,7 @@ module Gridy
7
7
 
8
8
  included do
9
9
  include Gridy::Controller
10
+ before_action :add_views
10
11
  before_action :set_resource, only: %i[ show edit update destroy ]
11
12
  end
12
13
 
@@ -50,6 +51,10 @@ module Gridy
50
51
 
51
52
  private
52
53
 
54
+ def add_views
55
+ prepend_view_path File.expand_path("../../../app/views/gridy", __dir__)
56
+ end
57
+
53
58
  def resource_class
54
59
  self.class.resource
55
60
  end
@@ -12,7 +12,7 @@ module Gridy
12
12
  end
13
13
 
14
14
  class_methods do
15
- def gridy(options)
15
+ def gridy(options = {})
16
16
  options.symbolize_keys!
17
17
  @resource = options[:model] if options[:model].present?
18
18
  @resource_attributes = options[:attributes] if options[:attributes].present?
data/lib/gridy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gridy
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
@@ -123,12 +123,12 @@ files:
123
123
  - app/assets/stylesheets/gridy/open-props.css
124
124
  - app/assets/stylesheets/gridy/open-props/buttons.css
125
125
  - app/assets/stylesheets/gridy/open-props/normalize.css
126
- - app/views/application/_form.html.erb
127
- - app/views/application/_search_form.html.erb
128
- - app/views/application/edit.html.erb
129
- - app/views/application/index.html.erb
130
- - app/views/application/new.html.erb
131
- - app/views/application/show.html.erb
126
+ - app/views/gridy/application/_form.html.erb
127
+ - app/views/gridy/application/_search_form.html.erb
128
+ - app/views/gridy/application/edit.html.erb
129
+ - app/views/gridy/application/index.html.erb
130
+ - app/views/gridy/application/new.html.erb
131
+ - app/views/gridy/application/show.html.erb
132
132
  - lib/gridy.rb
133
133
  - lib/gridy/controller.rb
134
134
  - lib/gridy/controller/actions.rb