My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
42
attachment: preferences_controller_render.patch
(1.8 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/preferences_controller.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/preferences_controller.rb (revision 43)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/preferences_controller.rb (working copy)
@@ -52,6 +52,7 @@
set_title('Shipping rates')
@shipping_types = OrderShippingType.find(:all)
end
+
def save_shipping
# Index is the shipping type ID.
params[:shipping_types].each do |id,type_attributes|
@@ -61,6 +62,7 @@
flash[:notice] = "Shipping rates updated."
redirect_to :action => 'shipping'
end
+
def add_new_rate_ajax
shipping_type = OrderShippingType.create(params[:shipping_type])
render(:partial => 'shipping_type', :locals => {:shipping_type => shipping_type})
@@ -65,6 +67,7 @@
shipping_type = OrderShippingType.create(params[:shipping_type])
render(:partial => 'shipping_type', :locals => {:shipping_type => shipping_type})
end
+
def remove_shipping_type_ajax
@type = OrderShippingType.find(
:first,
@@ -72,8 +75,9 @@
)
@type.destroy if @type
# Render nothing to denote success
- render_text ""
+ render :text => ""
end
+
# Simply renders the weight variation ajax partial.
# Gets passed container to render into.
def add_shipping_variation_ajax
@@ -92,7 +96,8 @@
)
end
end
- # Called for actually removing a weight variation if found, or just returns
+
+ # Called for actually removing a weight variation if found, or just returns
# nothing.
#
# This gets called for removing actual variations, and removing variations
Powered by
Google Project Hosting