Commit 7d89d1f36f0b28b046bb197d37809db87c63826f
1 parent
5e19d44c
Exists in
master
and in
29 other branches
rails3: fix manage_products_controller tests
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/my_profile/manage_products_controller.rb
... | ... | @@ -207,7 +207,7 @@ class ManageProductsController < ApplicationController |
207 | 207 | }.to_json |
208 | 208 | else |
209 | 209 | render :text => {:ok => false, |
210 | - :error_msg => _(cost.errors['name']) % {:fn => _('Name')} | |
210 | + :error_msg => _(cost.errors['name'].join('\n')) % {:fn => _('Name')} | |
211 | 211 | }.to_json |
212 | 212 | end |
213 | 213 | end | ... | ... |
app/helpers/manage_products_helper.rb
... | ... | @@ -163,7 +163,7 @@ module ManageProductsHelper |
163 | 163 | def cancel_edit_product_link(product, field, html_options = {}) |
164 | 164 | return '' unless (user && user.has_permission?('manage_products', profile)) |
165 | 165 | button_to_function(:cancel, _('Cancel'), nil, html_options) do |page| |
166 | - page.replace_html "product-#{field}", :partial => "display_#{field}", :locals => {:product => product} | |
166 | + page.replace_html "product-#{field}", CGI::escapeHTML(render :partial => "display_#{field}", :locals => {:product => product}) | |
167 | 167 | end |
168 | 168 | end |
169 | 169 | ... | ... |
app/models/product.rb
... | ... | @@ -11,7 +11,7 @@ class Product < ActiveRecord::Base |
11 | 11 | |
12 | 12 | SEARCH_DISPLAYS = %w[map full] |
13 | 13 | |
14 | - attr_accessible :name, :product_category, :highlighted, :price, :enterprise | |
14 | + attr_accessible :name, :product_category, :highlighted, :price, :enterprise, :image_builder, :description | |
15 | 15 | |
16 | 16 | def self.default_search_display |
17 | 17 | 'full' | ... | ... |