I have an ActionMailer Model (Notifier) and a view for the mail. In my controller i build an Array (access_data) that looks like this:
access_data = []
users.each do |user|
access_data << {'subscriptions' => user.subscriptions, 'login' => user.login}
end
When i create a "normal" view, i can do this:
<% access_data['subscriptions'].each do |subscription| %>
<%= subscription.service.name %>
<% end %>
But when i do the same in my Notifier-View, i get this error:
undefined method `service' for #<YAML::Object:0x1032bf3f0>
Is this because the Notifier-model extends ActionMailer::Base and not ActiveRecord::Base?