The `code` that i am trying to `shorten` in `one line`:

```
            if !request.xhr?
                    render_404
                    return
            end

```

from this function

```
def request_invite
    render_404 unless request.xhr?

        @invitation = Invite.new(params[:invite])

        if @invitation.save
            @return = { :error => false, :response => "OK" }
        else
            @return = { :error => true, :response => @invitation.errors.full_messages.join("<br />") } 
        end

        render :json => ActiveSupport::JSON.encode( @return )

end

```

i tried 

```
            render_404 return unless request.xhr?

```

but i get:

```
invites_controller.rb:4: void value expressio render_404 return unless request.xhr?

```

Should i stick with the above code that works or is there a better way to do this?