How can i make ruby line comments

In ruby we can make a line comments by using #.
but when we use the same ruby code in .rhtml, how can i make comments a
line

<%= link_to ‘Create New Book’, :controller => ‘Book’, :action => ‘list’
%>

I want to comment this line in .rhtml file…how can i do that…

On Apr 28, 2008, at 3:01 PM, Manish N. wrote:

I want to comment this line in .rhtml file…how can i do that…
<%#= link_to ‘Create New Book’, :controller => ‘Book’, :action =>
‘list’ %>
<%# this is an erb comment %>

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

Rob B. wrote:

On Apr 28, 2008, at 3:01 PM, Manish N. wrote:

I want to comment this line in .rhtml file…how can i do that…
<%#= link_to ‘Create New Book’, :controller => ‘Book’, :action =>
‘list’ %>
<%# this is an erb comment %>

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

Thnx Rob…

There is one more error…

i m new to ROR…
i make a simple prog for login…
Username and password…
if(right)
{
login
}
else
{
error msg
}

can u help me in this…

On Apr 28, 2008, at 3:17 PM, Manish N. wrote:

if(right)
{
login
}
else
{
error msg
}

can u help me in this…

Well, that’s not really enough to go on. Take a look at the
restful_authentication plugin or follow along with Agile Web
Development with Rails for that kind of thing.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

thanx ROB for u r advice…

but still i dnt knw how 2 use…if u hav any code for lgoin method
thn pls paste it here…i m getting prbolm of …
NoMethodError

my method is…

def login_submit
if session[‘user’]
@logged_in = true
else
@logged_in = false
end
@user = User.new(@params[‘user’])
if @session[‘user’] = User.authenticate(@params[‘user’][‘username’],
@params[‘user’][‘password’])
flash[:notice] = l(:user_login_succeeded)
redirect_to :action => ‘welcome’
else
@login = @params[‘user’][‘login’]
flash.now[:notice] = l(:user_login_failed)
end
end

and in the rhtml file the form is…

<% form_tag :controller => “user”, :action => “login_submit” do %>

Username:  

Password:  


<%= submit_tag “Login”%>
<% end %>

so can you help mee what is this prblm …

On Apr 28, 2008, at 4:09 PM, Manish N. wrote:

if session[‘user’]
@logged_in = true
else
@logged_in = false
end
@user = User.new(@params[‘user’])
if @session[‘user’] = User.authenticate(@params[‘user’]
[‘username’],
@params[‘user’][‘password’])
flash[:notice] = l(:user_login_succeeded)
Where is the l method defined? Is that where your NoMethodError comes
from?

Also, don’t user the @session or @params variables, use the session
and params methods instead:

if session[‘user’] = User.authenticate(params[‘user’][‘username’],
params[‘user’][‘password’])

-Rob

<% form_tag :controller => “user”, :action => “login_submit” do %>

Username:  

Password:  


<%= submit_tag “Login”%>
<% end %>

so can you help mee what is this prblm …

Rob B. http://agileconsultingllc.com
[email protected]

I remove all the things which you hav said…
but still the same prblm…and this code is running fine in my
office pc.
but not working in my home pc.

can u tell me wht the reason…???