Skip to content
Daniel O'Connor edited this page Dec 8, 2016 · 2 revisions

Controllers

Rely on Devise's load_resource or load_and_authorise_resource where possible.

class AccountTypesController < ApplicationController
  load_and_authorize_resource
  def show
     @account_type = AccountType.find(params[:id]) # You don't need to do this, it's already taken care of
  end

See https://github.com/Growstuff/growstuff/pull/1124/files

Views

We prefer feature tests over unit tests for views.

See https://github.com/Growstuff/growstuff/pull/421

Clone this wiki locally