pratik mokal
pratik mokal

Reputation: 21

how i pass values from controller to view in rails

i get value of username when i save session it should show username in textfield, how should i do this

<% @page_title = "UserAuth | fillup" %>
<div class="fillup">
  <h1>Sign fill</h1>
  <hr/>
<%= form_for(:session, :url => {:controller => 'session', :action => 'findle'}) do |f| %>
 <div class="field">
    <%= f.label :username %><br />
    <%= f.text_field :username %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
</div>

Upvotes: 0

Views: 37

Answers (1)

sugaryourcoffee
sugaryourcoffee

Reputation: 879

Try

form_for( @session, :url ...) do |f|

Upvotes: 1

Related Questions