aboutsummaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeLines
* InfoRequest#initial_request_text performanceGareth Rees2015-05-12-3/+9
| | | | | | | | Passes the InfoRequest's CensorRules directly to the OutgoingMessage. user system total real old 0.010000 0.010000 0.020000 ( 0.020827) new 0.010000 0.000000 0.010000 ( 0.016633)
* Allow optional censor rules to be passed to #bodyGareth Rees2015-05-12-5/+15
| | | | | | | If we’re in the context of an InfoRequest and want the OutgoingMessage#body, we can pass the rules in explicitly to avoid looking up the info request again. Otherwise it falls back to the existing behaviour.
* Add a non-mutating #apply_to_textGareth Rees2015-05-12-0/+5
| | | | | | Still need to `return nil if text_to_censor.nil?` because `gsub!` returns `nil` rather than the original text if it does not make a substitution.
* Use #raw_body sugar methodGareth Rees2015-05-12-1/+1
|
* Extract text cleaning from #body methodGareth Rees2015-05-12-9/+10
|
* InfoRequest#initial_request_text minor improvementGareth Rees2015-05-12-2/+1
| | | | | | system total real old 0.810000 0.300000 1.110000 ( 1.358172) new 0.970000 0.090000 1.060000 ( 1.292340)
* Merge branch 'version-dependent-caching' into rails-3-developLouise Crow2015-05-07-2/+12
|\
| * Force the encoding of values returned from YAML.Louise Crow2015-05-07-2/+12
| | | | | | | | | | | | | | | | | | This is a workaround for an issue where YAML in ruby 1.8 tags UTF-8 heavy strings as binary, resulting in them being retrieved under 1.9 as ASCII-8BIT which can't be concatenated with UTF-8. Described as "Deep deep YAML oddness" in https://www.zendesk.com/blog/upgrade-the-road-to-1-9/.
* | Minor tidy upGareth Rees2015-05-07-11/+8
| | | | | | | | | | | | | | Remove explicit returns Remove self Ternary for short conditional Moved #site_administration? to be nearer similar methods
* | Don't load PublicBody when initalizing InfoRequestGareth Rees2015-05-07-1/+2
| | | | | | | | | | Doesn't need to try to set the default law_used once it's persisted, so we save a query each time we find an InfoRequest
* | Extract logic from controllerGareth Rees2015-05-07-13/+6
| |
* | Add InfoRequest#move_to_public_bodyGareth Rees2015-05-07-0/+24
|/
* Merge branch 'hotfix/0.21.0.24' into rails-3-developGareth Rees2015-04-30-4/+8
|\
| * Rescue from Holidays::UnknownRegionErrorhotfix/0.21.0.24Gareth Rees2015-04-29-4/+8
| | | | | | | | | | 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.
* | Merge branch 'add-widget' into rails-3-developLouise Crow2015-04-28-2/+314
|\ \
| * | Use a boolean operator - 'and' and 'or' are for control flow.Louise Crow2015-04-28-1/+1
| | |
| * | Use || - 'and' and 'or' are for control flow, not logical operatorsLouise Crow2015-04-28-1/+1
| | |
| * | Move existing track logic to controllerLouise Crow2015-04-28-7/+6
| | |
| * | Move vote calculation to controller.Louise Crow2015-04-28-2/+2
| | |
| * | Use status value from controller.Louise Crow2015-04-28-4/+3
| | |
| * | Clean up first_or_create call.Louise Crow2015-04-28-1/+3
| | |
| * | Use a helper to generate the status text.Louise Crow2015-04-28-35/+48
| | | | | | | | | | | | | | | | | | | | | | | | This has length constraints, so we don't want to directly use InfoRequest.get_status_description (which also adds a full stop), but we want statuses that more closely correspond to get_status_description than those in the template, which are used in AskTheEU.
| * | Add height to stop long text overflowing.Louise Crow2015-04-28-0/+1
| | |
| * | Tweak widget size, add border.Louise Crow2015-04-28-2/+3
| | |
| * | Add closing tags for iframes.Louise Crow2015-04-28-2/+2
| | |
| * | Make scss, add custom hook.Louise Crow2015-04-28-4/+1
| | |
| * | Don't capitalize the labelLouise Crow2015-04-28-0/+1
| | |
| * | Move styling out of translatable text as much as possible.Louise Crow2015-04-28-6/+5
| | |
| * | Add a wrapperLouise Crow2015-04-28-12/+10
| | | | | | | | | | | | | | | We don't want to set absolute tops on the count and people in case they swap around when translated to other languages.
| * | Add text for people wanting to knowLouise Crow2015-04-28-3/+4
| | |
| * | Use title case - upcasing done in stylesheet.Louise Crow2015-04-28-16/+16
| | |
| * | Add status labelLouise Crow2015-04-28-0/+1
| | |
| * | Remove Open Sans font importLouise Crow2015-04-28-1/+0
| | |
| * | New styling from @martinwrightLouise Crow2015-04-28-14/+78
| | |
| * | Don't show the widget pages for requests without normal prominence.Louise Crow2015-04-28-1/+7
| | |
| * | Add link to create widget if widgets are enabled.Louise Crow2015-04-28-0/+5
| | |
| * | Validate the uniqueness of cookies within the scope of info requests.Louise Crow2015-04-27-0/+1
| | |
| * | Don't set 'same origin' policy for widget iframes.Louise Crow2015-04-27-0/+1
| | | | | | | | | | | | | | | Whilst this is a good security precaution in general, we want people to display these widgets in iframes on other sites.
| * | Allow widgets to be controlled with a feature flag.Louise Crow2015-04-27-1/+7
| | |
| * | Trim down styling, use classes, and clearer BEM-style naming.Louise Crow2015-04-27-74/+26
| | |
| * | Use resource-based RESTful routing and separate controllerLouise Crow2015-04-27-35/+48
| | |
| * | Add some specs for the vote tracking action.Louise Crow2015-04-27-3/+3
| | |
| * | Show "votes" along with tracks in widgetJody McIntyre2015-04-27-1/+1
| | |
| * | Add controller for non-logged in "voting"Jody McIntyre2015-04-27-6/+22
| | |
| * | Send widget_vote cookie when user not logged inJody McIntyre2015-04-27-0/+4
| | |
| * | Add model to track "votes" for a requestJody McIntyre2015-04-27-0/+19
| | |
| * | Don't open the request in the widget iframeJody McIntyre2015-04-23-1/+1
| | |
| * | Center count textJody McIntyre2015-04-23-0/+2
| | |
| * | Add link to widgetJody McIntyre2015-04-23-1/+5
| | |
| * | Add widget for info requestsJody McIntyre2015-04-23-0/+208
| | |