Adding Profile Picture to Bootstrap/Foundation Navbar with Devise/Oauth? -


i've been researching online , havent found guide on adding profile picture navbar when using oauth/devise/bootstrap or foundation - advice/guides? thank you.

there not information go off of here...

where profile picture being stored? grabbing user's oauth account? facebook or twitter? or storing yourself?

i assume trying update navbar locally stored profile pic once user has signed in (is correct?).

bootstrap , foundation js , css libraries, influence display, not needed display profile pic, in general.

if using ruby on rails , devise, have helper method called 'current_user', devise provides free.

if wanted display profile picture in nav bar upon user sign-in, use...

<nav id='nav_bar'>   <% if current_user %>    <%= image_tag("/assets/yourimagename.jpg", class: "foundation_or_bootstrap_class") %>   <% end %>   <ul class='nav_links'>     <li><%= link_to 'sign in', '#yourlinkhere', class: 'sign_link' %></li>     <li><%= link_to 'sign out', '#yourlinkhere', class: 'sign_link' %></li>   </ul> </nav> 

in instance, navbar update on page reload or redirect. if want update navbar javascript can well, require little more detailed coding.

if use devise gem first provided, don't have access directly devise views or controllers, above code go in views/layouts/application.html.erb above .

then profile pic present in navbar on view devise view.

if influence devise views , controllers, there way bring these out. devise wiki provides details procedure here...

https://github.com/plataformatec/devise#getting-started

under 'configuring views' , 'configuring controllers'

i can go further in detail , provide more code if add examples , more info. perhaps helps?


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -