Andy Allan
8938ab7997
Remove redundant presence validation on belongs_to
...
There's no need for us to have it when rails does this for us.
2022-03-01 10:01:16 +00:00
Andy Allan
a41d500b9f
Create an ApplicationRecord for models to inherit from
...
This is the default for Rails 5+, and also paves the way for
multiple database support.
2019-11-27 11:50:48 +01:00
Andy Allan
4377e2bd55
Update annotations to correctly show bigint types
2019-05-29 11:52:20 +02:00
Andy Allan
32ce4ea527
Move utf8 validator into app/validators
2019-02-06 12:11:44 +01:00
Tom Hughes
d73a5d4bc0
Merge character validators
2018-11-05 18:54:19 +00:00
J Guthrie
1e57189366
Added tests for validators
2018-11-05 16:23:30 +00:00
J Guthrie
c2f23fea6a
Create invalid_char validators and apply to models
2018-11-05 14:27:03 +00:00
Andy Allan
b2a8df0bd7
Add annotate gem and associated rake task. Annotate models.
2017-10-22 22:18:26 +01:00
Tom Hughes
dbe165bbb3
Fix some rubocop rails style issues
2015-02-26 00:12:54 +00:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
baf10cd392
Fix rubocop lint issues
2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
8fa9763281
Set default formats in the database now that rails handles enums
...
Because rails now reads the defaults from the database correctly it
no longer works to set them conditionally in after_initialise as they
have already been set.
2015-01-11 12:54:16 +00:00
Tom Hughes
f0feca800d
Replace attr_accessible with strong parameters
2013-09-21 11:35:46 +01:00
Tom Hughes
7be823bb11
Treat messages received by email as plain text
...
Move creation of a message from an email into the message model and
adjust the logic to treat messages received by email as plain text.
2012-03-17 16:37:00 +00:00
Tom Hughes
aa4205482a
Treat all newly entered blocks of text as Markdown
2012-03-17 16:36:55 +00:00
Tom Hughes
1340fca8f1
Turn on mass assignment protection
...
Require any attribute that is going to be mass assigned to be
whitelisted, and whitelist those attributes which need it
2012-03-06 08:54:45 +00:00
Tom Hughes
9deeae3f96
Remove validates_associated_of calls which target the user model as
...
we have a number of users with minor validation failures.
2010-02-25 21:50:09 +00:00
Tom Hughes
23b8672bc9
Add support for processing incoming mail messages in reply to message
...
notifications and diary comment notifications, turning the maill messages
into reply messages through the site messaging system.
2009-11-05 23:16:20 +00:00
Matt Amos
32b280eb8d
Added custom validator for UTF-8 strings.
2008-10-29 16:27:15 +00:00
Shaun McDonald
a5e5cbc739
Adding a lower and upper length on various web site varchar fields. Fixes one test.
2008-10-15 16:20:43 +00:00
Shaun McDonald
1bcc2242c0
Make sure that there is a sender and a recipient of a message. New test to make sure that there a message also has a sender and a recipient, as the validates_associated doesn't do anything if they are nil.
2008-07-18 16:44:14 +00:00
Tom Hughes
d3b42fef34
Add extra validation to messages and diary entries.
2007-09-04 14:05:13 +00:00
Tom Hughes
b61e4f77e8
Improve handling of user to user messages.
2007-08-14 17:29:27 +00:00
Nick Black
078301a780
messaging stuff
2007-05-05 12:29:44 +00:00
Nick Black
9c5c71f2d7
added user stuff inc beginning of messages
2007-05-04 19:42:17 +00:00