rubocop issues solved
This commit is contained in:
parent
5186dfcb12
commit
5cdedbf9a6
1 changed files with 4 additions and 5 deletions
|
|
@ -1,15 +1,14 @@
|
||||||
module Admin
|
module Admin
|
||||||
class VenueCommercialsController < Admin::BaseController
|
class VenueCommercialsController < Admin::BaseController
|
||||||
load_and_authorize_resource :conference, find_by: :short_title
|
load_and_authorize_resource :conference, find_by: :short_title
|
||||||
load_and_authorize_resource :venue ,through: :conference, singelton: true
|
load_and_authorize_resource :venue, through: :conference, singelton: true
|
||||||
before_action :set_venue
|
before_action :set_venue
|
||||||
before_action :set_commercial , only: [:update , :destroy]
|
before_action :set_commercial, only: [:update, :destroy]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@commercial = @venue.build_commercial(commercial_params)
|
@commercial = @venue.build_commercial(commercial_params)
|
||||||
authorize! :create, @commercial
|
authorize! :create, @commercial
|
||||||
|
|
||||||
#FIXME redirect to tab#commercial
|
|
||||||
if @commercial.save
|
if @commercial.save
|
||||||
redirect_to edit_admin_conference_venue_path,
|
redirect_to edit_admin_conference_venue_path,
|
||||||
notice: 'Commercial was successfully created.'
|
notice: 'Commercial was successfully created.'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue