]> git.openstreetmap.org Git - rails.git/commit
Fixed a bug in how fields in /message/new were being pre-filled out.
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 12 Jul 2009 16:01:49 +0000 (16:01 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 12 Jul 2009 16:01:49 +0000 (16:01 +0000)
commit2153fb6efde49f305c3f0d987f37a27d8e43ae26
tree4c56fdd8b0d01e7d101ab7e4f20cb08584f84570
parent866e982488629b42dfc4b63bb29165e1da21d5b5
Fixed a bug in how fields in /message/new were being pre-filled out.

When someone went to /message/new/:user the "Subject" are would be
pre-filled out with t('message.new.title'). The problem was that the
@title template variable was being used for two purposes, to set the
HTML <title> AND to pre-fill out the subject.

We don't always want these two to be the same, but sometimes we
do. E.g. when someone replies to a diary entry and visits
/message/new/:user?title=Foo we want Foo in the <title> and in the
pre-filled out Subject, and the same goes for replying to a message.

So I've split up the @title variable into @title and @subject.
app/controllers/message_controller.rb
app/views/message/new.html.erb