gridy 0.1.1 → 0.1.4

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
  SHA256:
3
- metadata.gz: 1f98bad3f9d8a28574f1195d323e4b922508a621241ca3f6c4f6c44b2cc3beef
4
- data.tar.gz: a785061ef024b438596cf7bba045a010c995ed8dd68f6782280764d8227b9adb
3
+ metadata.gz: 97a7d64bf7b70ef799b8c55b752cf0df7a3ca99fdbc3b663ab5447f022532f4f
4
+ data.tar.gz: 28e986f95315aafb56dee5f065cb0862650060483251a5340d4b10420d518827
5
5
  SHA512:
6
- metadata.gz: 4ce136ba24969e9a78a4fc9171d58374f17476025b5c89c896dea1627990ba6c6485fb1cc0def3fdfd9db9ad1909fc0a257cfa7c268cbe07f44b76b22afef87a
7
- data.tar.gz: 5b4331673bff37ccee633f227f122d68a1b6695821596edf166b0fcda6f3331a319b29d7b87db021a3ee93ce75692b49d4dbdd11020e846302b46bf226275386
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.1"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -16,7 +16,7 @@ module Gridy
16
16
 
17
17
  def gridy_table_header(field, title = nil, sortable: false)
18
18
  unless sortable
19
- return content_tag(:th, title || field.to_s.titleize)
19
+ return title || field.to_s.titleize
20
20
  end
21
21
 
22
22
  uri = URI(request.url)
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.1
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