aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | Merge branch '875-remove-charities' into rails-3-developGareth Rees2014-10-30-10/+0
| |\ \ \ \
| | * | | | Remove WDTK-specific charity linksGareth Rees2014-10-29-10/+0
| | | |/ / | | |/| | | | | | | These will be moved to whatdotheyknow-theme
| * | | | Merge branch 'issues/1457-close-change-request-without-email' into ↵Louise Crow2014-10-30-27/+38
| |\ \ \ \ | | |/ / / | |/| | | | | | | | rails-3-develop
| | * | | Remove redirect to trailing slash URL.Louise Crow2014-10-30-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Introduced in 4f501309ade230f65f4ba45e1d0161e89587d755 but no longer needed as we don't proxy the admin interface.
| | * | | Allow closure of a change request without sending an email.Louise Crow2014-10-30-14/+37
| | | | |
| * | | | Merge branch 'code_tidying' into rails-3-developGareth Rees2014-10-29-564/+716
| |\ \ \ \
| | * | | | Remove extra newlinesGareth Rees2014-10-29-3/+0
| | | | | |
| | * | | | Group PublicBody callbacks and macros at topGareth Rees2014-10-29-18/+21
| | | | | |
| | * | | | Extract descriptions in to TrackThing::TRACK_TYPESGareth Rees2014-10-29-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes TrackThing.track_type_description easier to understand and easier to add new track types along with a description.
| | * | | | Use where syntax for TrackThing.find_existingGareth Rees2014-10-29-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster (0.2ms vs 9.3ms) Shorter line length Non-deprecated syntax
| | * | | | Refactor TrackType types and mediums to constantsGareth Rees2014-10-29-12/+11
| | | | | |
| | * | | | Dynamically call params hash for TrackThing#paramsGareth Rees2014-10-29-20/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Easier to add params now; just add TRACK_TYPE_params method which returns the hash you want. Uses more idiomatic ||= instead of if @params.nil?
| | * | | | Extract hashes in TrackThing#params to methodsGareth Rees2014-10-29-113/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use private methods to make TrackThing#params easier to read and ready for dynamic method calling based on the track_type
| | * | | | Clean TrackThingGareth Rees2014-10-29-51/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use inline if Remove explicit return Use string interpolation Use unless instead of if ! Remove self. Use . instead of :: for class method calls
| | * | | | Use self. for TrackThing class methodsGareth Rees2014-10-29-8/+8
| | | | | |
| | * | | | Group TrackThing class methods at top of fileGareth Rees2014-10-29-35/+37
| | | | | |
| | * | | | Group TrackThing macro methodsGareth Rees2014-10-29-6/+3
| | | | | |
| | * | | | 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 'body-show-sidebar-partial' into rails-3-developGareth Rees2014-10-28-21/+28
| |\ \ \ \ \
| | * | | | | Extract public_body/show sidebar to partialGareth Rees2014-10-28-21/+28
| |/ / / / / | | | | | | | | | | | | Easier to override
| * | | | | Merge branch 'censor_rule_cleanup' into rails-3-developGareth Rees2014-10-28-35/+38
| |\ \ \ \ \
| | * | | | | Avoid use of parameter with attribute nameGareth Rees2014-10-15-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `text` parameter in `apply_to_text!(text)` can easily be confused with the `text` attribute of a CensorRule. Renamed to avoid confusion and renamed the parameter in `apply_to_binary!` for consistency.
| | * | | | | Privatise uncalled CensorRule methodsGareth Rees2014-10-15-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make public api as slim as possible
| | * | | | | Extract duplication in CensorRuleGareth Rees2014-10-15-2/+6
| | | | | | |
| | * | | | | Clean up CensorRuleGareth Rees2014-10-15-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid self when not required https://github.com/bbatsov/ruby-style-guide#no-self-unless-required - Pad hashes - Line length - Omit paentheses for method calls with no arguments https://github.com/bbatsov/ruby-style-guide#no-args-no-parens - Avoid return where not required https://github.com/bbatsov/ruby-style-guide#no-explicit-return
| * | | | | | Merge branch 'fix_transient_locale_integration_errors' into rails-3-developLouise Crow2014-10-28-8/+32
| |\ \ \ \ \ \
| | * | | | | | Allow resetting of the locale pattern on the locale routing filter.Louise Crow2014-10-28-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An order-dependent error in locale integration tests (https://travis-ci.org/mysociety/alaveteli/jobs/37914013) showed that the routing filter pattern was not being updated from it's initial value when a new set of available locales was passed to AlaveteliLocalization.
| | * | | | | | Use factories, not fixtures, in integration spec.Louise Crow2014-10-28-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the dependency on fixtures having been loaded.