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....

<%#= link_to 'Create New Book', :controller => 'Book', :action => 'list' %> <%# this is an erb comment %>

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

Rob Biedenharn 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 Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

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..........

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 Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

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...........

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)

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

     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 %> <p class="input_fields"><label>Username: &nbsp;</label><input id="user_username" name="user[username]" size="15" type="text" /></p> <p class="input_fields"><label>Password: &nbsp;</label><input id="user_password" name="user[password]" size="15" type="password" /></p><br clear="all" />

<%= submit_tag "Login"%> <% end %> -------------------------------------------------------------------------- so can you help mee what is this prblm .............

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

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........???