# class UserOrgRolesController

### Public Instance Methods

create() click to toggle source

POST /user_org_roles POST /user_org_roles.json

    # File app/controllers/user_org_roles_controller.rb, line 42
    def create
      @user_org_role = UserOrgRole.new(params[:user_org_role])

      respond_to do |format|
        if @user_org_role.save
          format.html { redirect_to @user_org_role, notice: 'User org role was successfully created.' }
          format.json { render json: @user_org_role, status: :created, location: @user_org_role }
        else
          format.html { render action: "new" }
          format.json { render json: @user_org_role.errors, status: :unprocessable_entity }
        end
      end
    end

destroy() click to toggle source

DELETE /user_org_roles/1 DELETE /user_org_roles/1.json

    # File app/controllers/user_org_roles_controller.rb, line 74
    def destroy
      @user_org_role = UserOrgRole.find(params[:id])
      @user_org_role.destroy

      respond_to do |format|
        format.html { redirect_to user_org_roles_url }
        format.json { head :no_content }
      end
    end

edit() click to toggle source

GET /user_org_roles/1/edit

    # File app/controllers/user_org_roles_controller.rb, line 36
    def edit
      @user_org_role = UserOrgRole.find(params[:id])
    end

index() click to toggle source

GET /user_org_roles GET /user_org_roles.json

    # File app/controllers/user_org_roles_controller.rb, line 4
    def index
      @user_org_roles = UserOrgRole.all

      respond_to do |format|
        format.html # index.html.erb

        format.json { render json: @user_org_roles }
      end
    end

new() click to toggle source

GET /user_org_roles/new GET /user_org_roles/new.json

    # File app/controllers/user_org_roles_controller.rb, line 26
    def new
      @user_org_role = UserOrgRole.new

      respond_to do |format|
        format.html # new.html.erb

        format.json { render json: @user_org_role }
      end
    end

show() click to toggle source

GET /user_org_roles/1 GET /user_org_roles/1.json

    # File app/controllers/user_org_roles_controller.rb, line 15
    def show
      @user_org_role = UserOrgRole.find(params[:id])

      respond_to do |format|
        format.html # show.html.erb

        format.json { render json: @user_org_role }
      end
    end

update() click to toggle source

PUT /user_org_roles/1 PUT /user_org_roles/1.json

    # File app/controllers/user_org_roles_controller.rb, line 58
    def update
      @user_org_role = UserOrgRole.find(params[:id])

      respond_to do |format|
        if @user_org_role.update_attributes(params[:user_org_role])
          format.html { redirect_to @user_org_role, notice: 'User org role was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit" }
          format.json { render json: @user_org_role.errors, status: :unprocessable_entity }
        end
      end
    end