aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
Commit message (Collapse)AuthorAgeLines
* Merge branch 'release/0.11'0.11.0.3Louise Crow2013-06-04-1174/+281
|\
| * When extracting attachments for an incoming message and getting the body of ↵Louise Crow2013-05-29-7/+16
| | | | | | | | the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958.
| * Check that display_filename matches URL part number or fallbackMark Longair2013-05-24-3/+22
| | | | | | | | | | | | | | | | | | | | | | If the display_filename of the attachment found from the URL part number doesn't match the passed in display_filename then the email may have been reparsed, causing a reordering. In that case, look to see if there is another attachment that uniquely matches that filename, and, if so, return that other attachment. If no matching uniquely matching filename is found, redirect to the incoming message, rather than returning a 404.
| * Refactor IncomingMessage.get_attachment_by_url_part_numberMark Longair2013-05-24-6/+1
| |
| * Move the mapi requires to where they're really neededMark Longair2013-05-22-2/+0
| | | | | | | | | | | | | | Handling of outlook-packed attachments would fail from rake tasks or in the console without requiring 'mapi/msg' and 'mapi/convert' beforehand. Instead, require them in the source file where they're actually used.
| * Avoid an FoiAttachment validation failure under Rails 3Mark Longair2013-05-16-0/+1
| | | | | | | | | | | | | | | | | | | | | | Under Rails 3, the uudecoded FoiAttachment in this test fails validation at the self.save! in IncomingMessage.parse_raw_email, although the FoiAttachment has been correctly created and saved to the database in _uudecode_and_save_attachments. Forcing a reload=true on self.foi_attachments fixes this. Thanks to Louise Crow for finding the fix for this problem.
| * Move "require 'alaveteli_file_types'" into the initializerMark Longair2013-05-16-1/+0
| |
| * Make efforts to ensure that we're usually dealing with UTF-8 stringsMark Longair2013-05-16-1/+6
| | | | | | | | | | | | | | | | | | One of these changes is to make sure that the Mail backend, like the TMail backend it replaces, will return text parts encoded in UTF-8 if possible. The other change is to ensure that when text attachments are reloaded from disk, we attempt to convert them to UTF-8.
| * Mark ban text as html safeLouise Crow2013-04-25-1/+1
| |
| * Merge branch 'release/0.9' into rails-3-developLouise Crow2013-04-24-2/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/public_body_controller.rb app/mailers/track_mailer.rb app/views/request/_hidden_correspondence.html.erb app/views/request/_sidebar.html.erb app/views/request/hidden.html.erb app/views/request/new_please_describe.html.erb app/views/request/preview.html.erb app/views/user/show.html.erb config/environment.rb config/routes.rb spec/controllers/public_body_controller_spec.rb
| * | Remove cvs tagMatthew Landauer2013-03-26-2/+0
| | |
| * | Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-19/+19
| | |
| * | Replace use of Iconv in Ruby 1.9 to get rid of deprecation warningsHenare Degan2013-03-16-7/+23
| | |
| * | Fix up some merge action from f60ada47d4e7aabe0dce152109cb0d91865929daHenare Degan2013-03-15-1/+1
| | |
| * | Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-93/+102
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * | | Remove schema information as this won't be updated any moreHenare Degan2013-03-04-30/+0
| | | |
| * | | Convert validators to newer, more Railsy ActiveModelHenare Degan2013-03-04-19/+29
| | | |
| * | | We need to reload here in Rails 3.1 (caching?)Henare Degan2013-03-03-0/+3
| | | |
| * | | Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-26/+26
| | | |
| * | | In Ruby 1.9.3 we need to explicitly require iconv because it's not ↵Henare Degan2013-02-28-1/+1
| | | | | | | | | | | | | | | | implicitly loaded via Mail
| * | | Remove Tmail and use the Mail gem under Ruby 1.8.7 as wellHenare Degan2013-02-27-8/+0
| | | |
| * | | Fix calculation of attachment sizes in Ruby 1.9.3Henare Degan2013-02-27-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | force_encoding is generally not a good idea and I can't see what it's trying to achieve here so... Revert "Use the character set of the attachment to encode the string that we're pulling out of the file before converting it to our default encoding." This reverts commit 3729f2053d4c04396d440a9c368bed174e9c9605.
| * | | Rename ALL THE TEMPLATES!!1!!!one!!1!!Henare Degan2013-02-27-1/+1
| | | | | | | | | | | | | | | | .rhtml is deprecated in favour of .erb in Rails 3
| * | | Overwriting validate is deprecatedHenare Degan2013-02-25-2/+4
| | | |
| * | | Update to new mail sending APIHenare Degan2013-02-25-4/+4
| | | |
| * | | Mailers have their own home in Rails 3Henare Degan2013-02-25-948/+0
| | | |
| * | | New way of sending an emailHenare Degan2013-02-25-1/+1
| | | |
| * | | Under Ruby 1.9 this saved to the DB as a Ruby ActiveSupport::SafeBuffer ↵Henare Degan2013-02-21-1/+1
| | | | | | | | | | | | | | | | object but we want it saved as a String
| * | | Rails.env should never not be set, I think this is a relic of RAILS_ENVHenare Degan2013-02-20-5/+1
| | | |
| * | | Remove deprecated constants - #589Henare Degan2013-02-20-2/+2
| | | |
| * | | Merge branch 'develop' into rails-3-spikeHenare Degan2013-02-15-55/+67
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/general_controller.rb app/controllers/track_controller.rb app/models/outgoing_message.rb app/models/public_body.rb app/models/user.rb app/views/general/frontpage.rhtml config/environment.rb config/initializers/inflections.rb config/initializers/mime_types.rb db/migrate/094_remove_old_tags_foreign_key.rb lib/timezone_fixes.rb spec/models/request_mailer_spec.rb spec/views/request/list.rhtml_spec.rb
| * | | | Looks like this is different in the older version of Mail tooHenare Degan2013-02-10-1/+1
| | | | |
| * | | | #errors always returns an array now so check for an empty one insteadHenare Degan2013-02-07-2/+2
| | | | |
| * | | | Update to globalize3 methodHenare Degan2013-02-07-1/+1
| | | | |
| * | | | Move over to rails 3 mail api because there appear to be problems with ↵Matthew Landauer2013-02-01-10/+10
| | | | | | | | | | | | | | | | | | | | sending attachments
| * | | | Added a bit of a safety net. It's an ugly temporary hack to make debugging ↵Matthew Landauer2013-01-31-0/+8
| | | | | | | | | | | | | | | | | | | | easier
| * | | | Merge branch 'i18n_rails3_preparation' into rails-3-spikeMatthew Landauer2013-01-31-10/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/general_controller.rb app/controllers/public_body_controller.rb spec/controllers/public_body_controller_spec.rb
| | * | | | As much as possible use I18n.locale for getting the localeMatthew Landauer2013-01-17-2/+2
| | | | | |
| | * | | | Small refactorMatthew Landauer2013-01-17-6/+1
| | | | | |
| | * | | | Refactor using I18.with_localeMatthew Landauer2013-01-17-4/+3
| | | | | |
| | * | | | Set locale with I18n rather than through globalizeMatthew Landauer2013-01-17-4/+4
| | | | | |
| | * | | | Small refactoring in PublicBody.self.find_by_url_name_with_historic just use ↵Matthew Landauer2013-01-16-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | the current locale
| | * | | | Set locale in controller test by passing parameter in getMatthew Landauer2013-01-16-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also using I18n.locale to pass the current locale around.
| * | | | | Workaround for setting default value on attribute when exists? is calledMatthew Landauer2013-01-29-2/+7
| | | | | |
| * | | | | Don't need both url_helpersHenare Degan2013-01-25-1/+0
| | | | | |
| * | | | | Overwriting validate has been deprecatedHenare Degan2013-01-25-9/+12
| | | | | |
| * | | | | Merge branch 'rails_xss' into rails-3-spikeMatthew Landauer2013-01-25-5/+8
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock config/environment.rb lib/i18n_fixes.rb
| * | | | | | Rename mailer method to avoid naming conflict in Rails 3Matthew Landauer2013-01-25-1/+1
| | | | | | |
| * | | | | | Change method name as it conflicts with globalize3 method nameHenare Degan2013-01-24-1/+1
| | | | | | |
| * | | | | | Update one method in RequestMailer to new mailer rails 3 apiMatthew Landauer2013-01-04-6/+8
| | | | | | |