aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Extract UserInfoRequestSentAlert alert typesGareth Rees2014-10-29-10/+14
| | | | | | | | Extract UserInfoRequestSentAlert alert types to ALERT_TYPES constant. Useful for tests and forms (access with UserInfoRequestSentAlert::ALERT_TYPES) and gives more meaning to what the array contains
* Clean UserGareth Rees2014-10-29-80/+80
| | | | | | | | | Remove self. Use unless instead of if ! Use . instead of :: for class methods Remove explicit return Use each instead of for Use inline if
* Group User class methods at top of classGareth Rees2014-10-29-105/+104
| | | | https://github.com/bbatsov/ruby-style-guide#consistent-classes
* Group User macro methods at top of fileGareth Rees2014-10-29-12/+8
| | | | https://github.com/bbatsov/rails-style-guide#macro-style-methods
* Move User callbacks to top of fileGareth Rees2014-10-29-2/+3
| | | | | Really difficult to figure out what’s going on when a callback is buried halfway between a load of methods
* Extract RawEmail inline calls to private methodsGareth Rees2014-10-29-3/+8
| | | | One less thing for #directory and #filepath to do
* Tidy RawEmailGareth Rees2014-10-29-14/+11
| | | | | | | Remove self. Use inline block Use inline unless Use unless instead of if !
* Tidy PurgeRequestGareth Rees2014-10-29-11/+8
| | | | | | | Remove explicit return Remove unneeded parentheses Remove self. Remove extra newlines
* Tidy ProfilePhotoGareth Rees2014-10-29-28/+26
| | | | | | Remove self. Use inline if Line length
* Extract after_initialize methods in PostRedirectGareth Rees2014-10-29-11/+10
| | | | Use separate methods to explicitly state what’s happening
* Tidy PostRedirectGareth Rees2014-10-29-17/+16
| | | | | | | | Line length Remove self. Use inline if Remove explicit return use unless instead of if !
* Move PostRedirect class methods to top of fileGareth Rees2014-10-29-20/+22
|
* Tidy HolidayGareth Rees2014-10-29-12/+12
| | | | | | Use self. for class methods Remove self. Line length
* Tidy ContactValidatorGareth Rees2014-10-29-1/+3
| | | | | Line Length Remove self.
* Move Comment class method to top of fileGareth Rees2014-10-29-15/+15
|
* Improve Comment.find_existingGareth Rees2014-10-29-4/+7
| | | | | Use `.where` Extract complex sql to named variable for readability and line length
* Use more meaningful validations in CommentGareth Rees2014-10-29-3/+9
| | | | Use validation method names that describe what the validation does
* Tidy CommentGareth Rees2014-10-29-17/+16
| | | | | | | | | | | | | Remove self. Use each rather than for Use {} block rather than do/end Use self. rather than ClassName. for class method Indent private as much as method definitions Remove explicit return Line Length Use inline if Move callback before method definitions Use unless instead of if !
* Extract complexity in ChangeEmailValidatorGareth Rees2014-10-29-2/+10
| | | | Add some private methods to add more semantics to conditionals
* Remove duplication in ChangeEmailValidatorGareth Rees2014-10-29-5/+8
|
* Tidy ChangeEmailValidatorGareth Rees2014-10-29-9/+19
| | | | | Line Length Remove self.
* Add ChangeEmailValidator specGareth Rees2014-10-29-0/+124
|
* Clean up AboutMeValidatorGareth Rees2014-10-20-1/+1
| | | | Remove self.
* Merge branch 'issues/1778-send-message' into rails-3-developGareth Rees2014-10-17-48/+129
|\
| * Remove now-unused OutgoingMessage#send_messageGareth Rees2014-10-17-48/+7
| | | | | | | | Models should not send emails
| * Extract resending a message from the modelGareth Rees2014-10-17-4/+27
| |
| * Use updated method for sending an InfoRequestBatchGareth Rees2014-10-17-1/+7
| | | | | | | | | | Could do with extracting the sending from the model, but this allows the removal of OutgoingMessage#send_message
| * Extract initial and followup sending from modelGareth Rees2014-10-17-6/+57
| |
| * OutgoingMessage methods for async email sendingGareth Rees2014-10-14-0/+42
| | | | | | | | | | | | | | | | | | #sendable? checks whether the message is in a state that we can send, otherwise it raises an appropriate exception. Not ideal (should just return false, but this is existing behaviour) #record_email_delivery updates the OutgoingMessage instance, logs an event with the InfoRequest and updates the InfoRequest state.
* | Merge branch 'spam_address_routing' into rails-3-developGareth Rees2014-10-14-8/+8
|\ \
| * | Add admin prefix to spam_addresses resourcesGareth Rees2014-10-10-8/+8
| |/
* | Merge branch 'issues/1830-batch-request-user-filter' into rails-3-developGareth Rees2014-10-14-2/+36
|\ \
| * | User profile option to filter requests by statusGareth Rees2014-10-14-2/+36
| |/ | | | | | | | | Filters on `latest_status` because filtering by `status` searches all states a request has ever been in.
* | Merge branch 'issues/222-category-editing-add-order-interface' into ↵Louise Crow2014-10-14-148/+1869
|\ \ | |/ |/| | | rails-3-develop
| * fixup! Use RESTful routing.Louise Crow2014-10-09-31/+31
| |
| * Require heading and category in PublicBodyCategoryLink.Louise Crow2014-10-09-1/+18
| | | | | | | | Update default factory accordingly.
| * fixup! Remove old PublicBodyCategories calls.Louise Crow2014-10-09-1/+1
| |
| * Remove default public_body_categories_[locale].rb files.Louise Crow2014-10-09-39/+0
| |
| * Add notes on removing public_body_category_[locale].rb files.Louise Crow2014-10-09-1/+1
| | | | | | | | Also note that calls to PublicBodyCategories are deprecated.
| * Remove old PublicBodyCategories calls.Louise Crow2014-10-09-12/+20
| | | | | | | | | | Add deprecation notice to draw attention to any place where PublicBodyCategories is called from themes.
| * fixup! Don't migrate categories automatically.Louise Crow2014-10-09-6/+10
| |
| * Don't migrate categories automatically.Louise Crow2014-09-26-13/+5
| | | | | | | | | | It becomes confusing in the test environment, better to have a clean script.
| * Find by translated name correctly.Louise Crow2014-09-26-2/+4
| | | | | | | | | | | | .where doesn't seem to use the translations with this version of Globalize, even in a locale block. As this is run-once code to migrate, I think we're fine with the old syntax.
| * fixup! Use translation tables for PublicBodyCategory and PublicBodyHeadingLouise Crow2014-09-26-2/+8
| |
| * Don't require a category descriptionLouise Crow2014-09-26-1/+20
| | | | | | | | | | Some existing themes don't use one for categories like 'misc' and that seems reasonable usage. Add some specs for the things we do validate.
| * Use double quotes to avoid backslashLouise Crow2014-09-26-3/+3
| |
| * Refactor for clarity of return/error conditionsLouise Crow2014-09-26-34/+53
| |
| * Rename partials to be more descriptiveLouise Crow2014-09-26-3/+3
| |
| * Use RESTful routing.Louise Crow2014-09-26-147/+135
| |
| * Create module to clarify what code is just for migrating from files.Louise Crow2014-09-25-83/+101
| |