Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

Keith Ryu's Profile

GitHub User: kibaekr

Comments by Keith Ryu


The history feature isn't working for me. I've done exactly as the tutorial has done but I get the following error when I try accessing the old url after editing it to a new url:

"Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return"."

def show

@track = Track.find(params[:id])

if request.path != track_path(@track)
 redirect_to @track, status: :moved_permanently

@profileimg =
if ( != true) && ( != current_user) 
  redirect_to tracks_url, alert: 'The track you were trying to view was not published yet (still in draft) and you are not the author.' 
  @mission = @track.missions.order("position ASC")  
  @comment = @track.track_comments

  respond_to do |format|
    format.html #show.html.erb
    format.json { render json: @track }

I figured this out. I posted an answer to my own question - see if this helps:

Basically, I forgot to add it to the attr_accessible on the User model, and I also had to unchange the changes I made to the after_sign_in_path_for method that devise comes along with. And also, dont forget to create a migration to add the columns provider and uid to the user table.


+1 I'm having the same problem of facebook keep adding the #=_. I looked it up and i t seemed like that was intentionally done to indicate that nothing has happened.

@supriya surve, i'm guessing everyone here that's having a problem has already gone through the docs there. I certainly have (read it multiple times), but still can't figure out what the problem is.