| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
mb_chars provides a multibyte-aware wrapper for strings. It should
have no effect on ruby 1.9.3 and above. Although ruby 1.8.7 wouldn't
raise errors on a badly sliced multibyte string, on upgrading to ruby
1.9.3 and above, string operations such as gsub, match and join may
produce ArgumentErrors with the message "invalid byte sequence in UTF-8".
Additionally, a database with 'UTF-8' encoding may produce the error
"PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8""
|
|
|
|
|
| |
If you run an Alaveteli in a region where we can’t show holiday
suggestions the holiday import page breaks. This commit rescues from
an unavailable region so that we display a friendly error message.
|
|
|
|
|
|
| |
Next commit adds a new spec; this before block was affecting the
behaviour of the new spec.
https://robots.thoughtbot.com/lets-not
|
|
|
|
|
| |
Fixes submission of form containing both existing and new
translations
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
app/views/public_body/show.html.erb
|
| | |
|
| |
| |
| |
| |
| | |
There's only one call to this function in the rest of the code. That
has 'html' set to true.
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
- 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?
|
|\ |
|
| |
| |
| |
| |
| | |
Existing behaviour seems to be that when a tag is specified, only
bodies that already have that tag will be updated.
|
| | |
|
| |
| |
| |
| |
| | |
As I understand it, the expectation is to replace any existing tags
with both the tag from the UI and the tags from the csv.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
spec/models/public_body_spec.rb
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| | |
Some fields have moved to different models, or exist in translation
tables.
|
|\ \ |
|
| | | |
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|
|
|
| |
It's required in [PublicBody#type_of_authority]( https://github.com/mysociety/alaveteli/blob/rails-3-develop/app/models/public_body.rb#L343-L347)
|
| |
|
|\ |
|
| |
| |
| |
| | |
Models should not send emails
|
| |
| |
| |
| | |
Update default factory accordingly.
|
| | |
|
| |
| |
| |
| |
| | |
Add deprecation notice to draw attention to any place where
PublicBodyCategories is called from themes.
|
| |
| |
| |
| |
| | |
It becomes confusing in the test environment, better to have a clean
script.
|
| |
| |
| |
| |
| | |
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.
|
| | |
|