rows_controller 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -3
- data/README.md +2 -1
- data/lib/rows/resources.rb +2 -2
- data/lib/rows/version.rb +2 -1
- data/lib/rows/version.rb.bak +3 -1
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 618397c8786b4799f77e8e70bfa22172923003580a0ad13d5ff3323b9dedd93f
|
4
|
+
data.tar.gz: 4265ff70f3fdaa358779f042c45792348b1f4f6a20cdcca88696a52b04237cca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ab460b7b817a0a2fece2237f0df7cf6484cbd1df3409ebd2b6c2f19ed9efade233d4b7684bd79c755ee44095d7289ad66b3d89f25bceb0e41b7bdb44f1fea5
|
7
|
+
data.tar.gz: 4f2ebde808777961a661a5458ca8749c589244d5ab12d18b72d82f86058cbbda0f87d02fcc98958f407a50f19725a9eb182610f33792208456418540abfbf787
|
data/MIT-LICENSE
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Copyright (c) 2012-2023 Dittmar Krall (www.matiq.com)
|
1
|
+
Copyright (c) 2012-2024 Dittmar Krall (www.matiq.com)
|
4
2
|
|
5
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
4
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# RowsController
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/rows_controller.svg)](https://badge.fury.io/rb/rows_controller)
|
3
3
|
[![GEM Downloads](https://img.shields.io/gem/dt/rows_controller?color=168AFE&logo=ruby&logoColor=FE1616)](https://rubygems.org/gems/rows_controller)
|
4
|
+
�[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)
|
4
5
|
|
5
6
|
DRYs Rails controllers. Imagine replacing that @order by 'resource' in the
|
6
7
|
controllers/views and, imho, an area for DRYing appears.
|
@@ -77,7 +78,7 @@ The model class can be retrieved with the helper model_class.
|
|
77
78
|
|
78
79
|
## Rails 7
|
79
80
|
|
80
|
-
RowsController 3.1
|
81
|
+
RowsController 3.1.* is intended for Rails 7.
|
81
82
|
In particular Hotwire caused some quirks
|
82
83
|
which are handled by this version.
|
83
84
|
Compatibility with older Rails versions are not intended
|
data/lib/rows/resources.rb
CHANGED
@@ -11,14 +11,14 @@ module Rows::Resources
|
|
11
11
|
|
12
12
|
def set_resource(row = nil)
|
13
13
|
row ||= model_class.find_by_id(params[:id].to_i)
|
14
|
-
instance_variable_set("@#{model_symbol}", row)
|
14
|
+
instance_variable_set(:"@#{model_symbol}", row)
|
15
15
|
@_resource = row
|
16
16
|
@row = row
|
17
17
|
end
|
18
18
|
|
19
19
|
def set_resources(rows = nil)
|
20
20
|
rows ||= model_class.all
|
21
|
-
instance_variable_set("@#{model_symbol_plural}", rows)
|
21
|
+
instance_variable_set(:"@#{model_symbol_plural}", rows)
|
22
22
|
@_resources = rows
|
23
23
|
@rows = rows
|
24
24
|
end
|
data/lib/rows/version.rb
CHANGED
data/lib/rows/version.rb.bak
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rows_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: sqlite3
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
description: YourController < RowsController ( < ApplicationController).
|
98
84
|
email:
|
99
85
|
- dittmar.krall@matiq.com
|
@@ -133,7 +119,7 @@ licenses:
|
|
133
119
|
- MIT
|
134
120
|
metadata:
|
135
121
|
source_code_uri: https://github.com/matique/rows_controller
|
136
|
-
post_install_message:
|
122
|
+
post_install_message:
|
137
123
|
rdoc_options: []
|
138
124
|
require_paths:
|
139
125
|
- lib
|
@@ -148,8 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
134
|
- !ruby/object:Gem::Version
|
149
135
|
version: '0'
|
150
136
|
requirements: []
|
151
|
-
rubygems_version: 3.5.
|
152
|
-
signing_key:
|
137
|
+
rubygems_version: 3.5.16
|
138
|
+
signing_key:
|
153
139
|
specification_version: 4
|
154
140
|
summary: RowsController DRYs your controllers.
|
155
141
|
test_files: []
|