Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rails hide field in json

class User < ActiveRecord::Base
  def to_json(options={})
    options[:except] ||= [:ip]
    super(options)
  end
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #hide #field #json
ADD COMMENT
Topic
Name
2+6 =