Monthly Archives: November 2012

linkedIn in Rails

Source 1) https://github.com/pengwynn/linkedin 2) http://pivotallabs.com/users/will/blog/articles/1096-linkedin-gem-for-a-web-app 3) https://developer.linkedin.com/documents/profile-fields#fullprofile in callback mention fields as the follows @profile= client.profile(:fields => %w(first_name last_name headline public_profile_url)) instead of @profile = client.profile   http://www.klairvoyant.in Advertisements

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

Devise and OmniAuth :- solutions

solutions for problems faced while implementing railcast Devise and OmniAuth (revised) #235 1) avoid the bracket and ENV in “/config/initializiers/devise.rb” file use config.omniauth :twitter, “TWITTER_CONSUMER_KEY”, “TWITTER_CONSUMER_SECRET” instead of config.omniauth :twitter, ENV[“TWITTER_CONSUMER_KEY”], ENV[“TWITTER_CONSUMER_SECRET”] 2) callback locations  are different since java script domains … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , , , , , , , , , , | Leave a comment

simple form – f.collection_radio_buttons Implementation sample code

<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> …….. <%= f.collection_radio_buttons( :role, [[‘1’, ‘Student’],[‘2′,’Alumni’],[‘3′,’HR’],[‘4′,’Recruiter’]], :first, :last,:checked=> ‘1’, :collection_wrapper_tag=>’label’,:collection_wrapper_class=>’bigSize’ ) do |b| b.label(:class => ‘my_class’) { b.radio_button + ” ” + b.text.html_safe } end %> ……….. <% end … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , | Leave a comment

Rails Migration file creation :- short way

If the migration name is of the form “AddXXXToYYY” or “RemoveXXXFromYYY” and is followed by a list of column names and types then a migration containing the appropriate add_column and remove_column statements will be created. Example $ rails generate migration … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment