funkensturm/spree_digital — Issue #9: ActionView::Template::Error (undefined method `digital?' for #<Variant:0x2aaaaee13880>):
Author: kiplrails
Created: 2012-01-30 05:25:57+00:00
State: open

Hello,

I am using the spree digital, the versions are as follows,
Rails 3.1
Ruby 1.8.7
spree-core - 0.70.3
spree-digital :branch => 'rails3-1'

On local-host my application is working fine without any error I can upload the digital version of the product.
but on server side when I try to add digital version of the product I am getting the "ActionView::Template::Error (undefined method `digital?' for #):". Below I am pasting the production log. & as per production log the method digital is undefined even if it is present & defined in spree_digital.

Production Log:--

Started GET "/admin/products/ruby-on-rails-stein/digitals" for 117.198.91.25 at Sun Jan 29 23:54:37 -0500 2012
Processing by Admin::DigitalsController#index as HTML
Parameters: {"product_id"=>"ruby-on-rails-stein"}
[1;32mDeface:[0m 2 overrides found for 'layouts/admin'
[1;32mDeface:[0m 'auth_admin_login_navigation_bar' matched 1 times with '[data-hook='admin_login_navigation_bar'], #admin_login_navigation_bar[data-hook]'
[1;32mDeface:[0m 'promo_admin_tabs' matched 1 times with '[data-hook='admin_tabs'], #admin_tabs[data-hook]'
Rendered vendor/bundle/ruby/1.8/gems/spree_core-0.70.3/app/views/admin/shared/_product_sub_menu.html.erb (3.5ms)
[1;32mDeface:[0m 1 overrides found for 'admin/shared/_product_tabs'
[1;32mDeface:[0m 'converted_admin_product_tabs_986577829' matched 1 times with '[data-hook='admin_product_tabs'], #admin_product_tabs[data-hook]'
Rendered vendor/bundle/ruby/1.8/gems/spree_core-0.70.3/app/views/admin/shared/_product_tabs.html.erb (103.6ms)
Rendered vendor/bundle/ruby/1.8/bundler/gems/spree_digital-20cc654c29ab/app/views/admin/digitals/index.html.erb within layouts/admin (185.6ms)
Completed 500 Internal Server Error in 873ms

ActionView::Template::Error (undefined method `digital?' for #):
10: <% else %>
11: This product has no variants.
12:
13: <% if @product.master.digital? %>
14: A digital version of this product currently exists:
15: <%= render @product.master.digital %>
16: <% end %>

Is this issue is spree_digital rails 3-1 branch specific or any other problem with spree_core/digital?