| Commit message (Collapse) | Author | Age | Lines |
| |
|
|\
| |
| |
| | |
ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
|
| |
| |
| |
| |
| |
| |
| | |
- Redefined User#public_banned? to User#banned?
- Add specs for User#banned?
- Deprecate User#public_banned?
- Replace use of User#public_banned? with User#banned?
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
Since https://github.com/mysociety/alaveteli/commit/80ad2d4c31075ffc994e8c48ea25e6e3c486c364
no themes have been loaded by tests unless explicitly specified, so I think it's safe to
remove the code added in https://github.com/mysociety/alaveteli/commit/3dfc53f6b82b3c5da79a4c710d45b859f61f4f5f
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously the call to public_body.send would return the value for
the default locale if no value was set in the current locale,
meaning that translations for attributes that were the same as
the attribute values in the default locale were not being loaded.
Fixes #2134.
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/|
| |
| | |
Comment above a method should apply to that method only
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
spec/models/public_body_spec.rb
|
| | |
| | |
| | |
| | | |
Array handling will no longer be supported in release 0.22
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also fixes #empty_translation? to check for String and Symbol keys named
'locale'.
Specs use a pre-change check to assert difference.
For some reason rspec change matcher fails with 'nil is not a symbol'.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
String#capitalize downcases remaining letters, so:
> 'heLLo WorLd'.capitalize
# => "Hello world"
Our version only works on the first character of the String, preserving
the case of the rest of the String:
> 'heLLo WorLd'.sub(/\S/) { |m| Unicode.upcase(m) }
# => 'HeLLo WorLd'
Also handle unicode.
|
| | | |
|
| |/
|/|
| |
| |
| | |
- to_sentence does the same job as the removed code.
- Clean up the conditional with .any? and implicit returns
|
| | |
|
| |
| |
| |
| |
| | |
Some fields have moved to different models, or exist in translation
tables.
|
|\ \ |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | |_|/
| |/| | |
|
| |/ /
| | |
| | |
| | | |
Attempting to make the import faster when there are lots of public authorities in the database already
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Seems more logical to make this one method that figures out what to do
based on file type. Plus, incoming message does so many things, it
seemed like having these related methods be separate would make them
easier to read and understand. Also, email, mobile and login
substitution texts weren't being translated. Finally, I think passing
the censor rules and masks as arguments is a first step in some more
decoupling of models.
|
|/ /
| |
| |
| | |
It's also used in the web interface and needs to be escaped there.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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
|