mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
done with creating relationship and generating view for venue_commercials
This commit is contained in:
parent
dc0da8c500
commit
7bbb0da17a
2 changed files with 29 additions and 22 deletions
|
|
@ -3,6 +3,7 @@ module Admin
|
|||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :venue ,through: :conference, singelton: true
|
||||
before_action :set_venue
|
||||
before_action :set_commercial , only: [:update , :destroy]
|
||||
|
||||
def create
|
||||
@commercial = @venue.build_commercial(commercial_params)
|
||||
|
|
@ -54,5 +55,9 @@ module Admin
|
|||
def set_venue
|
||||
@venue = @conference.venue
|
||||
end
|
||||
|
||||
def set_commercial
|
||||
@commercial = Commercial.find params[:id]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue