ruby - Rails url attribute's value cannot contain symbol '#' -
i've tried send request this.
localhost:3000/ws/job_histories/index?agent_id=#1000
but on controller i've received agent_id=''
or 1
localhost:3000/ws/job_histories/index?agent_id=10#00
i've received agent_id='10'
. think problem has because rails understand comment. how can correctly received data. rails doesn't give me exception.
the hash symbol fragment identifier , browser not send webserver ever.
if want send need url encode (%23
), can achieve cgi.escape('#')
.
Comments
Post a Comment