1
我想問一下,如果沒有任何方法可以在不使用Twitter Bootstrap的情況下更改Flash消息的外觀?Ruby on Rails:更改不帶Twitter的Flash消息顏色引導程序
這是我的觀點:.index.html.erb
<form class="login-form" action="/login" id="login-form" method="post" >
<h2 class="login-title">Sign In</h2>
<% flash.each do |name, msg| -%>
<%= content_tag :div, msg, class: name %>
<% end -%>
而且我的控制器如下:
def create
@user = User.find_by_email(params[:email])
# If the user exists AND the password entered is correct.
if @user && @user.authenticate(params[:password])
# login code comes here
else
flash.now[:error] = 'Invalid email/password combination'
render 'new'
end
end
如何樣式我的錯誤提示信息,而無需使用Twitter的引導?
預先感謝您!
你可以添加你自己的css類爲那 –
沒有冒犯,但這是一個非常混亂的問題...我有點不知所措,甚至開始回答。 – janfoeh