radiant-shop-extension 0.94.0 → 0.94.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.94.0
1
+ 0.94.1
@@ -72,7 +72,7 @@ class Admin::Shop::CategoriesController < Admin::ResourceController
72
72
  format.js { render :partial => '/admin/shop/categories/index/category', :locals => { :product => @shop_category } }
73
73
  format.json { render :json => @shop_category.to_json }
74
74
  end
75
- rescue
75
+ rescue Exception => error
76
76
  respond_to do |format|
77
77
  format.html {
78
78
  flash[:error] = error
@@ -103,7 +103,7 @@ class Admin::Shop::CategoriesController < Admin::ResourceController
103
103
  format.js { render :partial => '/admin/shop/categories/index/category', :locals => { :product => @shop_category } }
104
104
  format.json { render :json => @shop_category.to_json }
105
105
  end
106
- rescue
106
+ rescue Exception => error
107
107
  respond_to do |format|
108
108
  format.html {
109
109
  flash[:error] = error
@@ -79,7 +79,7 @@ class Admin::Shop::ProductsController < Admin::ResourceController
79
79
  format.js { render :partial => '/admin/shop/products/index/product', :locals => { :excerpt => @shop_product } }
80
80
  format.json { render :json => @shop_product.to_json }
81
81
  end
82
- rescue
82
+ rescue Exception => error
83
83
  respond_to do |format|
84
84
  format.html {
85
85
  flash[:error] = error
@@ -111,7 +111,7 @@ class Admin::Shop::ProductsController < Admin::ResourceController
111
111
  format.js { render :partial => '/admin/shop/products/index/product', :locals => { :product => @shop_product } }
112
112
  format.json { render :json => @shop_product.to_json }
113
113
  end
114
- rescue
114
+ rescue Exception => error
115
115
  respond_to do |format|
116
116
  format.html {
117
117
  flash[:error] = error
@@ -27,11 +27,7 @@ class ShopCategory < ActiveRecord::Base
27
27
 
28
28
  # Returns the content of the product's page's description part
29
29
  def description
30
- begin
31
- page.parts.find_by_name('description').content
32
- rescue
33
- ''
34
- end
30
+ page.render_part('description')
35
31
  end
36
32
 
37
33
  # Returns products through the pages children
@@ -35,11 +35,7 @@ class ShopProduct < ActiveRecord::Base
35
35
 
36
36
  # Returns the content of the product's page's description part
37
37
  def description
38
- begin
39
- page.parts.find_by_name('description').content
40
- rescue
41
- ''
42
- end
38
+ page.render_part('description')
43
39
  end
44
40
 
45
41
  # Returns the url of the page
@@ -82,7 +82,7 @@ module Shop
82
82
 
83
83
  desc %{ outputs the description of the current shop category }
84
84
  tag "shop:category:description" do |tag|
85
- tag.locals.shop_category.page.parts('description').render rescue nil
85
+ tag.locals.shop_category.description
86
86
  end
87
87
 
88
88
  desc %{ returns a link to the current category }
@@ -64,7 +64,7 @@ module Shop
64
64
 
65
65
  desc %{ outputs the description of the current shop product}
66
66
  tag "shop:product:description" do |tag|
67
- tag.locals.shop_product.page.parts('description').render rescue nil
67
+ tag.locals.shop_product.description
68
68
  end
69
69
 
70
70
  desc %{ generates a link to the products generated page }
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-shop-extension}
8
- s.version = "0.94.0"
8
+ s.version = "0.94.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dirk Kelly", "John Barker", "Darcy Laycock"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-shop-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 359
4
+ hash: 357
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 94
9
- - 0
10
- version: 0.94.0
9
+ - 1
10
+ version: 0.94.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dirk Kelly