Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rails hide field in json

respond_to do |format|
  format.json { render :json => @user, :except=> [:ip] } # or without format block: @user.to_json(:except => :ip)
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #hide #field #json
ADD COMMENT
Topic
Name
9+9 =