You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lodgings_controller.rb
    path of file: ./repos/osem/app/controllers/admin
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Admin
  class LodgingsController < Admin::BaseController
    load_and_authorize_resource :conference, find_by: :short_title
    load_and_authorize_res
    
    def create
      @lodging = @conference.lodgings.new(lodging_params)
      if @lodging.save
        redirect_to admin_conference_lodgings_path(conference_id: @conference.short_title),
                    notice: 'Lodging successfully created.'
      else
        flash.now[:error] = "Creating Lodging failed: #{@lodging.errors.full_messages.join('. ')}."
        render :new
      end