Module: ActiveRecordJsonUrlExtension
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/active_record_json_url_extension.rb
Defined Under Namespace
Classes: UrlHelper
Instance Method Summary collapse
Instance Method Details
#serializable_hash(options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/models/active_record_json_url_extension.rb', line 4 def serializable_hash( = {} ) [ :methods ] = [ :url ] if not [ :methods ] [ :methods ] = [ [ :methods ] ] if [ :methods ].kind_of? Symbol [ :methods ] << :url if [ :methods ] raise 'options[ :methods ] should be an array' unless [ :methods ].kind_of? Array super end |