Adds a new ActionView resolver, OrganisationResolver, which looks for a template in a subdirectory named after the current organisation's class, in preference to the default template in the default location.
Conflicts: app/controllers/application_controller.rb app/controllers/members_controller.rb app/controllers/proposals_controller.rb app/controllers/votes_controller.rb app/controllers/welcome_controller.rb
Requiring ruby-debug at Bundler setup time was causing an uninitialized constant RubyToken::AlreadyDefinedToken error in the doc:app Rake task. Until we find a better fix for this, you will need to enable the debugger explicitly by passing the `--debugger` option to `rails server` or `rails console` under 1.8.
Closes #300. The code assumed that the single organisation in single organisation mode would not have a subdomain set. However, OrganisationsController#create always sets the subdomain attribute. We now explicitly check the single_organisation_mode setting instead.
'stubs.rb' contained several helpers that claimed to be stubbing things, when in fact they were just creating real model objects. Now the file is 'helpers.rb', and method names avoid using 'stub'. Machinist factories are now used rather than making objects by hand where possible.
…licit controller actions.
Reduces confusion with controller/view #can? method provided by CanCan, and emphasies that we are checking business logic requirements, not checking basic permissions.
This consolidates checks against member_class permissions and checks against current organisation state into one place. The controller or view just asks whether the user is able to create/read/update/delete a particular resource.