Files
nairobi/app/controllers/admin/widget/cards_controller.rb
Javi Martín 4c0bb894eb Use polymorphic routes to manage cards
We use a different logic to load the card depending on the controller
we're using, and then share the rest of the code. This way we simplify
the code a bit, since we don't have to check for the page_id parameter.
2021-01-12 14:50:37 +01:00

11 lines
227 B
Ruby

class Admin::Widget::CardsController < Admin::BaseController
include Admin::Widget::CardsActions
load_and_authorize_resource :card, class: "Widget::Card"
private
def index_path
admin_homepage_path
end
end