RailsCasts Pro episodes are now free!

Learn more or hide this

robbied72's Profile

GitHub User: robbied72

Comments by

Avatar

Is there a way of discounting certain fields in the drop down as i have a lot of foreign keys in the table that I want to search on?

Avatar

maybe a bit off subject but i am using omniauth to collect linked in profile data and am a bit stuck when it comes to getting info outside the - raise request.env["omniauth.auth"].to_yaml

I am trying to gain as much info as possible about signed in users such as past positions and location

here is the current user.rb save/create code

ruby
def self.from_omniauth(auth)
          where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
            user.provider = auth.provider
            user.uid = auth.uid
            user.name = auth.info.name
                  user.first_name = auth.info.first_name
                  user.last_name = auth.info.last_name
      user.image = auth.info.image
      user.industry = auth.info.industry
      user.current_job_title = auth.info.headline
      user.pub_profile = auth.info.urls.public_profile
      #user.interests = auth.info.interests
            user.save!
          end
        end

any help would be appreciated

Robbie

ps. i have had a look at this link but not sure how to go about getting the values into the db - [https://developer.linkedin.com/documents/profile-fields#profile]

Avatar

This is a great little gem to see what overheads you are getting in your app due to not slim lining your SQL statements +1

Avatar

So how would i go about redirecting a new user to a profile model so that they could fill in extra details about themselves?

Avatar

Thanks Brian, will give it a shot.

Avatar

What kind of cost could I expect for a small site with say between 100 and 500 hits per day? Would it work out cheaper than a linode vps in this case?

Avatar

Thanks for that Mike, works a treat :)

Avatar

Is there any way i could use a combination of two fields to use the Slug?

for instance I have

ruby
friendly_id :lname, :use => :slugged

and would like to add the first name of the user field - :fname to make it more unique.