diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1691fd0..00908b1 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,6 +13,15 @@ end end end + + def after_sign_in_path_for(resource) + sign_in_url = new_user_session_path(:only_path => false, :protocol => 'http') + if request.referer == sign_in_url + super + else + stored_location_for(resource) || request.referer || root_path + end + end^ def get_theme if ThemesForRails.available_theme_names.include?(params[:theme]) params[:theme] diff --git a/db/migrate/20130805170517_add_id_to_themen.rb b/db/migrate/20130805170517_add_id_to_themen.rb index b6799ae..6f1c2a2 100644 --- a/db/migrate/20130805170517_add_id_to_themen.rb +++ b/db/migrate/20130805170517_add_id_to_themen.rb @@ -1,7 +1,7 @@ class AddIdToThemen < ActiveRecord::Migration def change - add_column :themen, :themengruppe_id, :integer + add_column :themen, :themengruppe_id, :integer add_column :attachments, :thema_id, :integer - add_column :fragen, :thema_id, :integer + add_column :fragen, :thema_id, :integer end end