carlsednaoui / networkmill

1 stars 0 forks source link

Redirect after login #6

Closed jescalan closed 12 years ago

jescalan commented 12 years ago

Right now it redirects to /users which doesn't exist. Somewhere in the devise config you can change where it redirects after login

carlsednaoui commented 12 years ago

This is happening in the User Model due to the before_create :default_values.

The = false should be = 'false'. This will set it false as a "FalseClass"

Also, having a before filter still allows users to change the settings/ preferences. Just checked.

carlsednaoui commented 12 years ago

Just fixed it. Let me know what you think.

carlsednaoui commented 12 years ago

Also, on this note, here is what I put in the application controller:

# Devise: Where to redirect users once they have logged in def after_sign_in_path_for(resource) dashboard_path end

Perhaps the 1st time a user logs in, we could direct him to the "User Preference" path directly instead of the dashboard. Let me know what you think.

jescalan commented 12 years ago

Yep, that did it. Weird. We def need a new way to assign those defaults, but we can figure that out later. Saw that method, looks fine for now we can always change it later!

That being said, I just deleted the entire folder, re-cloned it and ran everything from scratch, now it's all working which is just fantastic.

carlsednaoui commented 12 years ago

Where is the "love this" button?

jescalan commented 12 years ago

Haha open an issue on github ; )

But yeah we should aim to make it such that we can just delete the entire app any time we want and get it back up and to the state it was before in a minute or two - this way we can be sure that the deploy and maintenance will be smooth. Just a matter of keeping up with seeds and keeping gems updated. We're doing great so far with this, what upppp.

carlsednaoui commented 12 years ago

hahaha fo shizzle ma' nizzle (read: im practicing americanism for my US Naturalisation test). All I wanna do is get out of work and crank some code!!

Arrggg