I have been building a small app to import a cv from linkedin.
Displaying the information is working out perfect, but saving it to
the database is turning out to be a challenge.

The full source code is at https://github.com/brunoamaral/lwork and
the source code of the import function is as follows:

def importcv

        @user = User.find_by_username(params[:username])
    client = LinkedIn::Client.new(@linkedin_apikey, @linkedin_secret)

        t = current_user.authentications.find_by_provider('linked_in')
        client.authorize_from_access(t.token, t.secret)

        @cv = client.profile(:fields =>
[:headline, :first_name, :last_name, :educations, :positions])

        @user.positions << @cv.positions
        @user.positions.save

  end

When running it, I get the message:
undefined method `match' for LinkedIn::Position::Resource:Class

The model adds the following to users:
has_many :positions, :class_name => LinkedIn::Position::Resource

What bugs me more is that I don't even know where to start looking for
an answer to this, so any hints on where to search and what to look
for are welcome.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to