<p></p>
<p><b>@grekko</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1373726077">app/abilities/ability.rb</a>:</p>
<pre style='color:#555'>> @@ -47,13 +47,14 @@ def initialize(user)
can [:show], :dashboard
can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
can [:make_friend, :remove_friend], Friendship
- can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
+ can [:new, :create, :reply, :show, :inbox, :outbox, :muted, :mark, :unmute, :destroy], Message
</pre>
<p dir="auto">Thanks for bringing this up. I read the article and the described patterns and ideas sounds reasonable at first glance but I have many open questions on how I'd implement specific current non-CRUD operations in a CRUD-style.</p>
<p dir="auto">Splitting up the <code class="notranslate">Messages#inbox</code>, <code class="notranslate">Messages#outbox</code> and <code class="notranslate">Messages#muted</code> actions into separate controllers, e.g. the <code class="notranslate">InboxController#index</code> you already mentioned seems straight forward to me.</p>
<p dir="auto">Although I'd probably namespace those controllers e.g. like to <code class="notranslate">Messages::InboxController#index</code> just to make it very clear that this is about a Message Inbox and not any other Inbox.</p>
<p dir="auto">Also I would say that <code class="notranslate">Messages#reply</code> could be <code class="notranslate">Messages::Replies#create</code> instead – in the spirit of keeping things CRUD-oriented – although I could be reading this as "This controller action creates a <code class="notranslate">Message::Reply</code>-record, although it actually creates just another <code class="notranslate">Message</code>-record 🤔</p>
<hr>
<p dir="auto">The ideas of keeping things more uniform and simple resonate with me, but I'd need more time to fiddle around with the ideas and how to apply them without creating "just more code and files" without getting the benefit of more organised and easier to grasp code and files.</p>
<p dir="auto">I must admit: Thats something I would not feel comfortable with experimenting in the scope of this PR :)</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1373726077">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLN6BOUP2PTFL3PEN4LYBK3QHAVCNFSM6AAAAAA53SDOR2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMBQGUYTGOJTGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLZOXSI5JG57CCRASTYBK3QHA5CNFSM6AAAAAA53SDOR2WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTFLPEIW.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4284/review/1700513931</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1373726077",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1373726077",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>