create_venue_commercial added
This commit is contained in:
parent
154f4a400c
commit
6f667a865b
4 changed files with 31 additions and 3 deletions
|
|
@ -1,11 +1,11 @@
|
|||
module Admin
|
||||
class CommercialsController < Admin::BaseController
|
||||
class VenueCommercialsController < Admin::BaseController
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :venue ,through: :conference, singelton: true
|
||||
before_action :set_venue
|
||||
|
||||
def create
|
||||
@commercial = @venue.commercial.build(commercial_params)
|
||||
@commercial = @venue.build_commercial(commercial_params)
|
||||
authorize! :create, @commercial
|
||||
|
||||
#FIXME redirect to tab#commercial
|
||||
Loading…
Add table
Add a link
Reference in a new issue