Simplify loading resources in DraftVersionsController
We were using `prepend: true`, but it doesn't seem to be necessary. We were also loading the draft versions twice in the index, so we can remove the line loading them a second time.
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseController
|
class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseController
|
||||||
include Translatable
|
include Translatable
|
||||||
|
|
||||||
load_and_authorize_resource :draft_version, class: "Legislation::DraftVersion", through: :process, prepend: true
|
load_and_authorize_resource :process, class: "Legislation::Process"
|
||||||
load_and_authorize_resource :process, class: "Legislation::Process", prepend: true
|
load_and_authorize_resource :draft_version, class: "Legislation::DraftVersion", through: :process
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@draft_versions = @process.draft_versions
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
Reference in New Issue
Block a user