Hi
I have a table service_desk_resolution_codes as below
id | name
----±-----------------
1 | << Select Any >>
2 | Resolution 1
3 | Resolution 2
And I am using this to submit resolution code in select box in a
view.What i need is if the user select << Select Any >> a validation
check is done says that this is not acceptable select any resolution
code…(Currently i have implemented it with a javascript).But how can i
do it in the model ServiceDeskResolution…Is the following way correct
validates_presence_of :service_desk_resolution_code_id, :if
=>“service_desk_resolution_code_id==1”
Surely this is error…But how can I do it in correct way
service_desk_resolution_code_id is a field of the table
service_desk_resolutions
Thanks in advance
Sijo