Plz, go to this url….
I was in the same situation:
If you are like me,and Ryan Bates, you like doing the important things yourself. If there are errors, they are your errors.
Chances are you will want to create your Rails authentication from scratch yourself. Ryan of Railscasts has an excellent screencast about this.
I switched from Devise to the custom authentication using this screencast. It was a breeze.
So now comes the customisation. One of these is the all-important Rails authentication redirect back to the funnel a user came from after they are done signing in, or up.
This can actually be achieved very easily:
Say I have a CharitiesController, that I want to close to unauthenticated users. In line with Devise, I would do this to force them to authenticate:
class CharitiesController > ApplicationController
before_filter :authenticate_user!, except: [:show, :index]
Set a return point
In my ApplicationController, given i have set the user sign in route to user_login, I can define a return point:
Python multiple inheritance and the diamond problem. the sequence of calling function in multiple inheritance and use of __mro__ .
THE DIV INSIDE IS A GOOD TOPIC TO COVER BECAUSE THERE IS A LOT OF CONFUSION TO MAKE THIS THING WORK PROPERLY. SO I AM SHARING MY EXPERIENCE TO WORKING WITH DIVS.
let us make two dive like this
———————– css to play with ———————–
width:200px; // 1. if you don’t give the value of height and width then its OK.
height:200px; // 2. IF you right that display:inline then all the inside div will have no effect of that. they will sit inside no matter if display : block or display:inherit
border:5px solid gray;
display:inherit; // if you give display:absolute then the whole div block will have the effect and still it will be good for inside divs
#inside // this is the inside div
margin : 0px auto; // this will make it to move to the center of the outer div
position: //( 1. if :absolute then its ok , 2. if :static 3. if :relative then its ok . but relative will leave its not taking the full of width and height . )
display: block ; // display:box. no effect same and its ok to have them
display :inline ;// give the behave like the pic 2 and all have the pic 1 effect
// ————————— pic 1———————————