def create
      self.resource = new_resource( resource_params )
      
      respond_to do |format|
        if resource.save
          format.html { redirect_to resource_url, notice: "#{resource_name.humanize} was successfully created." }
          format.js
          format.json { render :show, status: :create, location: resource_url }
        else
          format.html { render :new }
          format.js   { render :new }
          format.json { render json: resource.errors, status: :unprocessable_entity }
        end
      end
    end
def create
      self.resource = new_resource( resource_params )
      
      respond_to do |format|
        if resource.save
          format.html { redirect_to resource_url, notice: "#{resource_name.humanize} was successfully created." }
          format.js
          format.json { render :show, status: :create, location: resource_url }
        else
          format.html { render :new }
          format.js   { render :new }
          format.json { render json: resource.errors, status: :unprocessable_entity }
        end
      end
    end
POST /events
 POST /events.json