It's finally seems to work :)
My ActiveResource model looks like this :

class User < ActiveResource::Base
class << self
def element_path(id, prefix_options = {}, query_options = nil)
check_prefix_options(prefix_options)
prefix_options, query_options = split_options(prefix_options) if
query_options.nil?
"#{prefix(prefix_options)}#{collection_name}/#{URI.parser.escape
id.to_s}#{query_string(query_options)}"
end

def collection_path(prefix_options = {}, query_options = nil)
check_prefix_options(prefix_options)
prefix_options, query_options = split_options(prefix_options) if
query_options.nil?

"#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
end
def instantiate_collection(collection, prefix_options = {})
collection = collection[element_name.pluralize] if
collection.instance_of?(Hash)
collection.collect! { |record| instantiate_record(record,
prefix_options) }
end
end
self.site = "http://diufvm31.unifr.ch:8090/CyberCoachServer/resources/"
end

I founded how to solve the last error here
: https://github.com/rails/rails/issues/2318#issuecomment-3555973

Thanks a lot for your support! :)

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2t_fGEWP-dYJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 13 of 13 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 19, '12 at 10:49a
activeOct 21, '12 at 9:17p
posts13
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase