work on comments
This commit is contained in:
5
app/controllers/dtext_controller.rb
Normal file
5
app/controllers/dtext_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class DtextController < ApplicationController
|
||||
def preview
|
||||
render :inline => "<h1>Preview</h1><%= format_text(params[:body]) %>"
|
||||
end
|
||||
end
|
||||
@@ -7,7 +7,7 @@ class SessionsController < ApplicationController
|
||||
if User.authenticate(params[:name], params[:password])
|
||||
@user = User.find_by_name(params[:name])
|
||||
session[:user_id] = @user.id
|
||||
redirect_to(params[:url] || posts_path, :notice => "You are now logged in.")
|
||||
redirect_to(params[:url] || session[:previous_uri] || posts_path, :notice => "You are now logged in.")
|
||||
else
|
||||
redirect_to(new_session_path, :notice => "Password was incorrect.")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user