mononoken / fae-scribe

0 stars 0 forks source link

Make Note back button conditional #85

Open mononoken opened 4 months ago

mononoken commented 4 months ago

Either we should implement using the Rails symbol back:

<%= link_to "Back", :back %>

Or we could write a conditional to determine "back" given the user context. That may look something like this:

case current_user
when author
  show journal_url
when campaign_member
  show campaign_url
else
  link_to :back
end

The problem with that conditional is that the author may still want to go back to the campaign in some cases.

We could also provide links to both the campaign and the journal. However, that could get long depending on how many campaigns the journal has joined.