lib/openwfe/representations.rb
#
# Override me (message to ruote-rest and ruote-web2)
#
# (Warning : this method turns dots to underscores in the id)
#
Override me (message to ruote-rest and ruote-web2)
(Warning : this method turns dots to underscores in the id)
Override me ( message to ruote - rest and ruote - web2 ) ( Warning : this method turns dots to underscores in the id )
def link (rel, res, opts={})
      id, opts = if opts.is_a?(Hash)
        [ opts.delete(:id), opts ]
      else
        [ opts, {} ]
      end
      href = "/#{res}"
      href = "#{href}/#{OpenWFE.to_uscores(id)}" if id
      href = "#{href}?#{opts.collect { |k, v| "#{k}=#{v}" }.join('&')}" \
        if opts.size > 0
      [ href, rel ]
    end
def link ( rel , res , opts = { } ) id , opts = if opts . is_a? ( Hash ) [ opts . delete ( :id ) , opts ] else [ opts , { } ] end href = "/#{res}" href = "#{href}/#{OpenWFE.to_uscores(id)}" if id href = "#{href}?#{opts.collect { |k, v| "#{k}=#{v}" }.join('&')}" if opts . size > 0 [ href , rel ] end
Override me (message to ruote-rest and ruote-web2)
(Warning : this method turns dots to underscores in the id)
Override me ( message to ruote - rest and ruote - web2 ) ( Warning : this method turns dots to underscores in the id )
rel
<not_specific>
res
<not_specific>
opts
<not_specific>