On Wed, Aug 31, 2011 at 5:53 PM, Pab <[email protected]> wrote:

> Hi,
>
>
>      i got search which shows following error
>
>       ActionView::Template::Error (undefined method `model_name' for
> NilClass:Class):
>

i think this happens when @employee is nil. double check that @employee is
not nil.


>    1: <%= form_for(@employee) do |e| %>
>    2: EMP ID<%= e.text_field :id %><br>
>    3: <%= e.submit 'search', :controller => 'employees', :action =>
> 'search1' %>
>    4: <% end %>
>  in my search action i dint provide anything like
> def search
> end
>
> if i use  <%= form_for(:employee) do |e| %>
> it shows no error but the data is moving in to my "show" action
>
>   could any one provide me a soultion ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to