On 4 October 2011 14:15, Pab <[email protected]> wrote:
> hi,
>
>
>          i am using popup box for alert for repeated items with some
> dynamic values to display in my popup
> i have saved all values in @employee variable and when it call pop
> using button click it does't shows me data that is in @employee
> like
>    <div id="popup">
>  Employee list filtered
>     <% @employee.each do |emp|%>
>       name <%= emp.name%>
>       department <%= emp.dept %>
> <% end %>
> </div>
>
> only "Employee list filtered" is seen in popup  on other dynamic
> values are not displayed in it
> could  any one provide me solution ?

You could include some more diagnostics in your output, for example,
before the 'each' loop try displaying @employee.size to see if there
is anything there.  The symptom suggests that it is empty.

Also have a look at the Rails Guide on debugging, in particular how to
use ruby-debug to break into your code to inspect data and follow
flow.  If you find that @employee.size is 0 then break into the
controller code that sets it up to see what is going on.

Colin

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