rows_controller 3.2.0 → 3.2.1

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: 1c3ce447b8c13f598f9f3f7f0181964d5ffed3c63f53cc6d4cf97d10b2b2a10c
4
- data.tar.gz: c8d44ddd01d94c014bc7e75dffe6e385298e70f23ef20ac17d8548e7e28f22b7
3
+ metadata.gz: e05033a1488d34ffdf4e06a4ae953bb3f6c68d1cc1e6424401c76c0fac9c7e62
4
+ data.tar.gz: bf2efad0016a0a343b4e44018a2ea3608fcda142f68883cdf2d5220bf74cb4fb
5
5
  SHA512:
6
- metadata.gz: 9234c715d7bda274fb2cf6c76badc45faddbadac674e4c22006c0c91dc2d68a72ea2d0b1efc273a339f9ddc7e7852dad99e86bff7b9470a35ad189652c9cf0ac
7
- data.tar.gz: 37128cbbc023ab35b93e47d92dfc37739a0315777f420df68cbf8109c3c28cb3dfe6284ffc8e6548ff53ecd8253a2f0d52486ad4d18244e9b0100e9b77bbad3d
6
+ metadata.gz: f1c418118a3314d71da159ee8bcc648d3d72c8a683b90596a38b92f25ba10b37fdc262bc4a4439bd0fde977de241f528b4651272c3987b223ee7abd4562d16fb
7
+ data.tar.gz: 0bc3da421cebaba79d0ede4e16946419a151019fb72d6b85510005f91dd2dde0f9938baa91f799d98f69869e07847fa718e20c7302635ce5a5d18f3f89862b36
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2024 Dittmar Krall (www.matiq.com)
1
+ Copyright (c) 2012-2025 Dittmar Krall (www.matiq.com)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # RowsController
2
- [![Gem Version](https://badge.fury.io/rb/rows_controller.svg)](https://badge.fury.io/rb/rows_controller)
3
- [![GEM Downloads](https://img.shields.io/gem/dt/rows_controller?color=168AFE&logo=ruby&logoColor=FE1616)](https://rubygems.org/gems/rows_controller)
4
- [![rake](https://github.com/matique/rows_controller/actions/workflows/rake.yml/badge.svg)](https://github.com/matique/rows_controller/actions/workflows/rake.yml)
5
- [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
6
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/rows_controller?color=168AFE&logo=rubygems&logoColor=FE1616)](https://rubygems.org/gems/rows_controller)
4
+ [![Downloads](https://img.shields.io/gem/dt/rows_controller?color=168AFE&logo=rubygems&logoColor=FE1616)](https://rubygems.org/gems/rows_controller)
5
+ [![GitHub Build](https://img.shields.io/github/actions/workflow/status/matique/rows_controller/rake.yml?logo=github)](https://github.com/matique/rows_controller/actions/workflows/rake.yml)
6
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-168AFE.svg)](https://github.com/standardrb/standard)
7
+ [![MIT License](https://img.shields.io/badge/license-MIT-168AFE.svg)](http://choosealicense.com/licenses/mit/)
7
8
 
8
9
  DRYs Rails controllers. Imagine replacing that @order by 'resource' in the
9
10
  controllers/views and, IMHO, an area for DRYing appears.
@@ -30,10 +31,10 @@ class OrdersController < RowsController # < ApplicationController
30
31
  end
31
32
  ~~~
32
33
 
33
- I.e. RowsController defines all the usual methods (index, show, edit,...).
34
+ I.e. _RowsController_ defines all the usual methods (index, show, edit,...).
34
35
 
35
36
  The methods may be redefined in OrdersController
36
- (overwrites methods from RowsController).
37
+ (overwrites methods from _RowsController_).
37
38
 
38
39
  Low level methods like 'resources' may be redefined as well.
39
40
  An example:
@@ -44,21 +45,21 @@ def resources
44
45
  end
45
46
  ~~~
46
47
 
47
- RowsController inherites from ApplicationController, i.e. all the helpers
48
+ _RowsController_ inherites from ApplicationController, i.e. all the helpers
48
49
  defined there will be available.
49
50
 
50
51
 
51
52
  ## Customizing of views
52
53
 
53
- RowsController initializes some instance variables used in the views
54
+ _RowsController_ initializes some instance variables used in the views
54
55
  (e.g. @order, @orders; legacy @row & @rows are still supported).
55
56
  Furthermore, the helpers resource, resources, set_resource and
56
57
  set_resources are available. You guess their usage.
57
58
 
58
59
  Providing e.g. an "#{Rails.root}/app/views/order/index.html.erb"
59
- overwrites the default RowsController view as Rails will first look
60
+ overwrites the default _RowsController_ view as Rails will first look
60
61
  into the directory "#{Rails.root}/app/views" before looking
61
- into the RowsController.
62
+ into the _RowsController_.
62
63
 
63
64
  Similarly, partials '\_row\_buttons' and '\_list\_footer' may be overwritten
64
65
  as well.
@@ -66,7 +67,7 @@ as well.
66
67
 
67
68
  ## model_class
68
69
 
69
- RowsController guesses the model from params[:controller]. This can
70
+ _RowsController_ guesses the model from params[:controller]. This can
70
71
  be changed by:
71
72
 
72
73
  ~~~ruby
@@ -80,14 +81,14 @@ The model class can be retrieved with the helper model_class.
80
81
 
81
82
  ## Rails 8
82
83
 
83
- RowsController 3.2.* is intended for Rails 8+.
84
+ _RowsController_ 3.2.* is intended for Rails 8+.
84
85
  In particular, *turbo stream* is used for row deletion.
85
86
  Older Rails versions may use "gem 'rows_controller', '= 3.1.7'".
86
87
 
87
88
 
88
89
  ## Rails 7
89
90
 
90
- RowsController 3.1.* is intended for Rails 7.
91
+ _RowsController_ 3.1.* is intended for Rails 7.
91
92
  In particular Hotwire caused some quirks
92
93
  which are handled by this version.
93
94
  Compatibility with older Rails versions are not intended
data/lib/rows/model.rb CHANGED
@@ -2,10 +2,8 @@
2
2
 
3
3
  module Rows::Model
4
4
  def model_class
5
- # rubocop: disable
6
5
  @_model_class ||= self.class.model_class ||
7
6
  Kernel.const_get(params[:controller].classify)
8
- # rubocop: enable
9
7
  end
10
8
 
11
9
  if Rails::VERSION::MAJOR > 3
data/lib/rows/version.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module Rows
2
- VERSION = "3.2.0" # 2025-02-10
2
+ VERSION = "3.2.1" # 2025-06-23
3
+ # VERSION = "3.2.0" # 2025-02-10
3
4
  # VERSION = "3.1.7" # 2024-12-10
4
5
  # VERSION = "3.1.6" # 2024-09-07
5
6
  # VERSION = "3.1.5" # 2024-02-18
@@ -1,5 +1,6 @@
1
1
  module Rows
2
- VERSION = "3.1.7" # 2024-12-10
2
+ VERSION = "3.2.0" # 2025-02-10
3
+ # VERSION = "3.1.7" # 2024-12-10
3
4
  # VERSION = "3.1.6" # 2024-09-07
4
5
  # VERSION = "3.1.5" # 2024-02-18
5
6
  # VERSION = "3.1.4" # 2024-02-18
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rows_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -123,16 +123,16 @@ require_paths:
123
123
  - lib
124
124
  required_ruby_version: !ruby/object:Gem::Requirement
125
125
  requirements:
126
- - - ">="
126
+ - - "~>"
127
127
  - !ruby/object:Gem::Version
128
- version: '0'
128
+ version: '3'
129
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.6.2
135
+ rubygems_version: 3.6.7
136
136
  specification_version: 4
137
137
  summary: RowsController DRYs your controllers.
138
138
  test_files: []