Tom Hughes
03fdc6d67f
Add inverse_of to relationships that can't detect it automatically
2022-02-23 19:23:51 +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
Tom Hughes
d73a5d4bc0
Merge character validators
2018-11-05 18:54:19 +00:00
Tom Hughes
873ac155ca
Improve consistency of text validations
2018-11-05 17:06:48 +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
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +01:00
Mikel Maron
a32076abd6
fix rubocop warnings
2016-10-07 06:32:05 -04:00
Mikel Maron
3c01d2e80d
more idiomatic models for diary entry subscriptions
2016-10-06 20:31:10 -04:00
Mikel Maron
443080d7b0
WIP diary comment subscriptions
2016-10-03 15:04:22 -04: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
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
ca30b879f6
Eliminate deprecated scope and association arguments
2013-09-21 11:35:46 +01:00
Tom Hughes
f0feca800d
Replace attr_accessible with strong parameters
2013-09-21 11:35:46 +01:00
Tom Hughes
ac1f210736
Replace the spam observer with simple after_save callbacks
2013-06-25 21:54:02 +01:00
Paweł Paprota
67a03d44a1
Display a diary entry count on the user page
2012-10-07 16:17:01 +01: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
3227f40193
Make more use of named scopes
2011-11-14 09:42:51 +00:00
Tom Hughes
5a54630b57
Add support for suspended and confirmed users
...
Replace the existing "active" and "visible" with an enumerated status
that allows for extra cases. Currently we have "suspended" for users
who hve triggered the spam detector and "confirmed" for users that have
triggered the detector but have been confirmed as vald by an admin.
2010-05-06 17:18:34 +01: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
57a05a40fc
Make diary comment creation work again.
2009-11-15 11:00:54 +00:00
Tom Hughes
634565c5d3
Add support for logical deletion of diary entries and comments.
2009-11-14 15:57:08 +00:00
Tom Hughes
5b3b288fc2
Add a list of languages and fix a few issues with the schema. Also get
...
language selection for diary entries working.
2009-05-30 16:37:21 +00:00
Shaun McDonald
53b4d645d8
First stage of i18n. Some migrations and extra plugins.
2009-05-22 18:36:17 +00:00
Matt Amos
8140c99313
Fix for correct boolean handling in query.
2009-03-29 00:56:08 +00:00
Thomas Wood
e198ec6252
Add validations for diary entry lat/lons and tests for diary entry validations. Closes #1395
2008-12-15 23:24:09 +00:00
Shaun McDonald
bdd5c317a7
Adding some more diary entry tests. Making the RSS feed links more portable, by using the SERVER_URL constant. Fixing the validation for the length of the language of diary entries until the i18n branch is integrated.
2008-11-13 17:20:40 +00:00
Shaun McDonald
bf29550db8
Resyncing from head 10895:11795
2008-11-08 11:52:58 +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
Tom Hughes
c771557b38
Disambiguate order clause.
2008-10-12 18:42:34 +00:00
Tom Hughes
6a5749c55c
Hide diary entries and comments made by deleted users.
2008-10-12 18:38:54 +00:00
Tom Hughes
8181cb4bf7
Add support for commenting on, and replying to, diary entries.
2008-01-17 23:12:25 +00:00
Tom Hughes
d3b42fef34
Add extra validation to messages and diary entries.
2007-09-04 14:05:13 +00:00
Steve Coast
f498a9287a
various diary bits
2007-04-07 20:12:35 +00:00
Steve Coast
f9baf5f392
diary / user bits
2007-04-07 19:50:55 +00:00