This is what I get in my development logs which I think means I am not
passing any parameters to the controller 'show_indisciplines':

ActionView::TemplateError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each) on line #36 of
app/views/employee_indisciplines/show_indisciplines.html.erb:
33:             <tr class="tr-head">
34:                 <td><%= t('student_case_content') %></td><td><%=
t('student_case_creation') %></td>
35:             </tr>
36:             <% @employee_indiscipline.each do |employee | %>
37:                 <tr class="tr-<%= cycle('odd', 'even') %>">
38:                     <td class="col-4"><%= employee.content %></td>
39:                     <td class="col-7"><%=
employee.created_at.strftime("%A, %d. %B %Y, %H:%M") %></td>


​
I have shared my routes on the gist.(
https://gist.github.com/Brayoni/3102c5dab7f76b1cee7b)
​

Regards,
Ian Brayoni






On Mon, Aug 11, 2014 at 7:31 AM, Cynthia Kiser <[email protected]> wrote:

> Quoting Ian Baraza Brayoni <[email protected]>:
> > I am trying to pick rails and I am having trouble trying to pass params
> > from a view to another controller method through a link_to tag.
> >
> > Here is my code <https://gist.github.com/Brayoni/3102c5dab7f76b1cee7b>.
> >
> > Your ideas are highly appreciated.
>
> Nothing very obviously amiss - other than being very old style
> Rails. What is the output? Are you not getting the HTML you expect
> from the link_to? Or is clicking the link not getting you where you
> expect to go? To help I would need to see the HTML snippet produced
> and the development log from when you click the link. (And I am
> assuming your routes are set up correctly).
>
>
>
> --
> Cynthia N. Kiser
> [email protected]
>
> --
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "SD Ruby" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sdruby/Wy-Zldi3hRM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to