Skip to content

Commit

Permalink
Fixes FCO#364. Uses model's or column's
Browse files Browse the repository at this point in the history
  • Loading branch information
FCO committed Sep 14, 2019
1 parent 392250b commit 7750c96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/MetamodelX/Red/Dirtable.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ method set-helper-attrs(Mu \type) {
type.^add_attribute: $!dirty-old-values-attr;
}

submethod !TWEAK_pr(\instance: *%data) {
submethod !TWEAK_pr(\instance: *%data) is rw {
my @columns = instance.^columns;

my %new = |@columns.map: {
Expand Down
2 changes: 1 addition & 1 deletion lib/MetamodelX/Red/Model.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ method add-column(::T Red::Model:U \type, Red::Attr::Column $attr) {
}
self.add-comparate-methods(T, $attr);
if $attr.has_accessor {
if $attr.rw {
if type.^rw or $attr.rw {
T.^add_multi_method: $name, method (Red::Model:D:) is rw {
use nqp;
nqp::getattr(self, self.WHAT, $attr.name)
Expand Down

0 comments on commit 7750c96

Please sign in to comment.