| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Attempting to make the import faster when there are lots of public authorities in the database already
|
| |
|
|
|
|
|
|
|
| |
7a3b462f41321034cbdd2c83707f739a442e83c6.
The string with the unsubstituted variable pattern was being made
available for translation, instead of the translatable version.
|
|
|
|
| |
It's required in [PublicBody#type_of_authority]( https://github.com/mysociety/alaveteli/blob/rails-3-develop/app/models/public_body.rb#L343-L347)
|
|
|
|
|
| |
962357c tidied the translation but left the translation call (`_()`)
around the variable rather than the string literal.
|
| |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Makes TrackThing.track_type_description easier to understand and easier
to add new track types along with a description.
|
| |
| |
| |
| |
| |
| | |
Faster (0.2ms vs 9.3ms)
Shorter line length
Non-deprecated syntax
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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?
|
| |
| |
| |
| |
| | |
Use private methods to make TrackThing#params easier to read and ready
for dynamic method calling based on the track_type
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use inline if
Remove explicit return
Use string interpolation
Use unless instead of if !
Remove self.
Use . instead of :: for class method calls
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove self.
Use unless instead of if !
Use . instead of :: for class methods
Remove explicit return
Use each instead of for
Use inline if
|
| |
| |
| |
| | |
https://github.com/bbatsov/ruby-style-guide#consistent-classes
|
| |
| |
| |
| | |
https://github.com/bbatsov/rails-style-guide#macro-style-methods
|
| |
| |
| |
| |
| | |
Really difficult to figure out what’s going on when a callback is
buried halfway between a load of methods
|
| |
| |
| |
| | |
One less thing for #directory and #filepath to do
|
| |
| |
| |
| |
| |
| |
| | |
Remove self.
Use inline block
Use inline unless
Use unless instead of if !
|
| |
| |
| |
| |
| |
| |
| | |
Remove explicit return
Remove unneeded parentheses
Remove self.
Remove extra newlines
|
| |
| |
| |
| |
| |
| | |
Remove self.
Use inline if
Line length
|
| |
| |
| |
| | |
Use separate methods to explicitly state what’s happening
|
| |
| |
| |
| |
| |
| |
| |
| | |
Line length
Remove self.
Use inline if
Remove explicit return
use unless instead of if !
|
| | |
|
| |
| |
| |
| |
| |
| | |
Use self. for class methods
Remove self.
Line length
|
| |
| |
| |
| |
| | |
Line Length
Remove self.
|
| | |
|
| |
| |
| |
| |
| | |
Use `.where`
Extract complex sql to named variable for readability and line length
|
| |
| |
| |
| | |
Use validation method names that describe what the validation does
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 !
|
| |
| |
| |
| | |
Add some private methods to add more semantics to conditionals
|
| | |
|
| |
| |
| |
| |
| | |
Line Length
Remove self.
|
| |
| |
| |
| | |
Remove self.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Make public api as slim as possible
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Models should not send emails
|
| | |
|
| |
| |
| |
| |
| | |
Could do with extracting the sending from the model, but this allows
the removal of OutgoingMessage#send_message
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
#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.
|