For udisks2:
If udisks2 is in use, following actions are needed to not automount a device. Fisrt, you need to get informations about the device to write a udev rule. Unmount the device, become root via
sudo su
then run this command:
udevadm monitor --environment --udev
After that, plug the device to the computer. Now, you can see relative informations about the device. What you need is ENV{ID_VENDOR} and ENV{ID_FS_UUID}. Especially ID_FS_UUID is important because it is a unique value for the device. Press ctrl+c to exit udevadm.
Then, run the following command to get other informations you need
udevadm info -a -p $(udevadm info -q path -n /dev/sdX)
Replace /dev/sdX with your drive. Look for ATTRS{idVendor} and
ATTRS{idProduct} values. You need SUBSYSTEM AND DRIVER values to specify which device block this rule will be applied and ENV{UDISKS_AUTO}="0" to make the device not auto-mountable. If you get all informations you need, it is time to write udev rule. Open a new rule file:
sudo -H gedit /etc/udev/rules.d/10-noautomount.rules
And write information you got to it:
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{idVendor}=="3538"
ATTRS{idProduct}=="0070"
ENV{ID_VENDOR}=="PQI"
ENV{ID_FS_UUID}=="1A5AFC1F427754BF"
ENV{UDISKS_AUTO}="0"
Save the file and close it. A rule in /etc/dev/rules.d/ directory has the highest priority. By writing the rule in that directory, we will prevent any problem that may hinder the rule.
Now, you can test your rule to see whether it is working or not. First, you need to learn "devpath" of the device. You will see lines in the output of
udevadm info -a -p $(udevadm info -q path -n /dev/sdX)
command similar to this line:
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5...'
Some of them is very long and is not usefull for you. You need to cut that line to a degree which is usefull for you. To learn where to cut, run this command:
dmesg | grep usb
You will see lines relative to the device similar to these lines:
usb 2-1.5: new high-speed USB device number 15 using ehci-pci
usb 2-1.5: New USB device found, idVendor=3538, idProduct=0070
usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.5: Product: PQI USB Flash drive
usb 2-1.5: Manufacturer: PQI
usb 2-1.5: SerialNumber: XQVBW9KR
usb-storage 2-1.5:1.0: USB Mass Storage device detected
Pay attantion to value after usb one (2-1.5). It shows that your device's path and where to cut. So "devpath" of this device is
/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5
Now you can test the new udev rule by running this command:
udevadm test /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5
Near the end of the output of above command, if you see the line
UDISKS_AUTO=0
it means that your new rule is working. To apply the new rule, you need to reload udev rules by
udevadm control --reload
If it does not work, run
udevadm trigger
After that, you can see wherher the new rule is working or not by un-plugging the device and re-plugging it. Your device will be shown in Unity launcher like this:

In my case, "nd" is the device to which no-automount udev rule is applied. If I press the icon of the device, it will be mounted.
For udisks
If udisks is in use, you can use ENV{UDISKS_PRESENTATION_NOPOLICY}="0" value to make the device not-automountable. Since my system ( Ubuntu 15.04) isn't using udisks, I can not give specific instructions but the process is similar. Write a new udev rule in /etc/udev/rules.d/ directory for your device with values you get above and add ENV{UDISKS_PRESENTATION_NOPOLICY}="0" value instead of ENV{UDISKS_AUTO}="0" value.
I hope this answer help you.