scaffolding_extensions 1.3.11 → 1.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -21,14 +21,14 @@ to better suit your needs.
21
21
  Scaffolding Extensions currently supports:
22
22
 
23
23
  * Web Frameworks
24
- * Rails 2.3.2
24
+ * Rails 2.3.5 (with or without RailsXss plugin)
25
25
  * Ramaze 2009.06.12
26
26
  * Camping 1.5
27
- * Sinatra 0.9.2
27
+ * Sinatra 0.9.4
28
28
  * Merb 1.0.4
29
29
  * Object Relational Mappers
30
- * ActiveRecord 2.3.2
31
- * Sequel 3.1.0
30
+ * ActiveRecord 2.3.5
31
+ * Sequel 3.8.0
32
32
  * Javascript Libaries (used for Ajax/Autocompleting)
33
33
  * Prototype 1.6.0.3
34
34
  * JQuery 1.2.3
@@ -92,9 +92,22 @@ module ScaffoldingExtensions
92
92
  private
93
93
  # Adds a before filter for checking nonidempotent requests use method POST
94
94
  def scaffold_setup_helper
95
- helper ScaffoldingExtensions::Helper
95
+ mod = ScaffoldingExtensions::Helper.clone
96
+ helper mod
97
+ if mod.respond_to?(:safe_helper, true)
98
+ mod.send(:safe_helper, :scaffold_association_links, :scaffold_auto_complete_result,
99
+ :scaffold_button_to, :scaffold_button_to_remote, :scaffold_field_tag,
100
+ :scaffold_form, :scaffold_habtm_ajax_associations,
101
+ :scaffold_habtm_association_line_item, :scaffold_javascript_tag,
102
+ :scaffold_label, :scaffold_link, :scaffold_manage_link,
103
+ :scaffold_model_error_messages, :scaffold_model_field_tags,
104
+ :scaffold_model_form, :scaffold_select_tag,
105
+ :scaffold_add_habtm_element, :scaffold_remove_existing_habtm_element,
106
+ :scaffold_text_field_tag_with_auto_complete,
107
+ :scaffold_form_remote_tag, :scaffold_javascript_autocompleter,
108
+ :scaffold_load_associations_with_ajax_link)
109
+ end
96
110
  helper ScaffoldingExtensions::ActionControllerHelper
97
- helper ScaffoldingExtensions::PrototypeHelper
98
111
  include ScaffoldingExtensions::Controller
99
112
  include ScaffoldingExtensions::ActionController
100
113
  helper_method "scaffolded_method?", "scaffolded_nonidempotent_method?", :scaffold_url, :scaffold_flash, :scaffold_session
@@ -73,8 +73,12 @@
73
73
  </style>
74
74
  </head>
75
75
  <body>
76
- <%= "<h1>#{@scaffold_title}</h1>" if @scaffold_title %>
77
- <%= "<h4>#{scaffold_get_flash}</h4>" if scaffold_get_flash %>
76
+ <% if @scaffold_title %>
77
+ <h1><%= @scaffold_title %></h1>
78
+ <% end %>
79
+ <% if scaffold_get_flash %>
80
+ <h4><%= scaffold_get_flash %></h4>
81
+ <% end %>
78
82
 
79
83
  <%= @content %>
80
84
 
@@ -5,25 +5,41 @@
5
5
  <% @scaffold_class.scaffold_fields(@scaffold_listtable_type).each do |column| -%>
6
6
  <th><%=h @scaffold_class.scaffold_column_name(column) %></th>
7
7
  <% end %>
8
- <%= "<th>#{s = 'Show'}</th>" if show = scaffolded_method?(ss = "show#{@scaffold_suffix}") %>
9
- <%= "<th>#{e = 'Edit'}</th>" if edit = scaffolded_method?(es = "edit#{@scaffold_suffix}") %>
10
- <%= "<th>#{d = 'Delete'}</th>" if delete = scaffolded_method?(ds = "destroy#{@scaffold_suffix}") %>
8
+ <% if show = scaffolded_method?(ss = "show#{@scaffold_suffix}") %>
9
+ <th><%= s = 'Show' %></th>
10
+ <% end %>
11
+ <% if edit = scaffolded_method?(es = "edit#{@scaffold_suffix}") %>
12
+ <th><%= e = 'Edit' %></th>
13
+ <% end %>
14
+ <% if delete = scaffolded_method?(ds = "destroy#{@scaffold_suffix}") %>
15
+ <th><%= d = 'Delete' %></th>
16
+ <% end %>
11
17
  </tr></thead><tbody>
12
18
  <% @scaffold_objects.each do |entry| eid = entry.scaffold_id %>
13
19
  <tr>
14
20
  <% @scaffold_class.scaffold_fields(@scaffold_listtable_type).each do |column| %>
15
21
  <td><%=h entry.scaffold_value(column).to_s %></td>
16
22
  <% end %>
17
- <%= "<td>#{scaffold_button_to(s, scaffold_url(ss, :id=>eid), :method=>:get)}</td>" if show %>
18
- <%= "<td>#{scaffold_button_to(e, scaffold_url(es, :id=>eid), :method=>:get)}</td>" if edit %>
19
- <%= "<td>#{scaffold_button_to(d, scaffold_url(ds, :id=>eid))}</td>" if delete %>
23
+ <% if show %>
24
+ <td><%= scaffold_button_to(s, scaffold_url(ss, :id=>eid), :method=>:get) %></td>
25
+ <% end %>
26
+ <% if edit %>
27
+ <td><%= scaffold_button_to(e, scaffold_url(es, :id=>eid), :method=>:get) %></td>
28
+ <% end %>
29
+ <% if delete %>
30
+ <td><%= scaffold_button_to(d, scaffold_url(ds, :id=>eid)) %></td>
31
+ <% end %>
20
32
  </tr>
21
33
  <% end %>
22
34
  </tbody></table>
23
35
 
24
36
  <% if @scaffold_listtable_type == :browse %>
25
- <%= "<a href='#{scaffold_url("browse#{@scaffold_suffix}", :page=>(@page-1))}'>Previous Page</a>" if @page > 1 %>
26
- <%= "<a href='#{scaffold_url("browse#{@scaffold_suffix}", :page=>(@page+1))}'>Next Page</a>" if @next_page %>
37
+ <% if @page > 1 %>
38
+ <a href="<%= scaffold_url("browse#{@scaffold_suffix}", :page=>(@page-1)) %>">Previous Page</a>
39
+ <% end %>
40
+ <% if @next_page %>
41
+ <a href="<%= scaffold_url("browse#{@scaffold_suffix}", :page=>(@page+1)) %>">Next Page</a>
42
+ <% end %>
27
43
  <% end %>
28
44
 
29
45
  <% if @scaffold_listtable_type == :search && @scaffold_search_results_form_params && (@scaffold_search_results_form_params[:page] > 1 || @scaffold_search_results_form_params[:next_page]) %>
@@ -38,8 +54,12 @@
38
54
  <% @scaffold_search_results_form_params[:null].each do |field| -%>
39
55
  <%= scaffold_field_tag(:hidden, :value=>field, :name=>"null#{scaffold_param_list_suffix}") %>
40
56
  <% end %>
41
- <%= '<input type="submit" name="page_previous" value="Previous Page" />' if @scaffold_search_results_form_params[:page] > 1 %>
42
- <%= '<input type="submit" name="page_next" value="Next Page" />' if @scaffold_search_results_form_params[:next_page] %>
57
+ <% if @scaffold_search_results_form_params[:page] > 1 %>
58
+ <input type="submit" name="page_previous" value="Previous Page" />
59
+ <% end %>
60
+ <% if @scaffold_search_results_form_params[:next_page] %>
61
+ <input type="submit" name="page_next" value="Next Page" />
62
+ <% end %>
43
63
  </form>
44
64
  <% end %>
45
65
 
@@ -7,8 +7,10 @@
7
7
  ["Merge #{plural_name}", :merge],
8
8
  ["Search #{plural_name}", :search],
9
9
  ["Show #{singular_name}", :show]].each do |text, action| -%>
10
- <% link = scaffold_check_link(text, true, "#{action}#{@scaffold_suffix}") -%>
11
- <%= "<li>#{link}</li>" unless link == '' %>
10
+ <% link = scaffold_check_link(text, true, "#{action}#{@scaffold_suffix}")
11
+ unless link == '' %>
12
+ <li><%= link %></li>
13
+ <% end %>
12
14
  <% end %>
13
15
  </ul>
14
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffolding_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.11
4
+ version: 1.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-29 00:00:00 -07:00
12
+ date: 2010-01-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -24,24 +24,24 @@ extra_rdoc_files: []
24
24
  files:
25
25
  - LICENSE
26
26
  - README
27
- - lib/scaffolding_extensions.rb
28
- - lib/scaffolding_extensions/controller.rb
27
+ - lib/scaffolding_extensions/model/active_record.rb
28
+ - lib/scaffolding_extensions/model/sequel.rb
29
29
  - lib/scaffolding_extensions/controller/action_controller.rb
30
30
  - lib/scaffolding_extensions/controller/camping.rb
31
31
  - lib/scaffolding_extensions/controller/ramaze.rb
32
32
  - lib/scaffolding_extensions/controller/sinatra.rb
33
33
  - lib/scaffolding_extensions/controller/merb.rb
34
- - lib/scaffolding_extensions/helper.rb
35
34
  - lib/scaffolding_extensions/jquery_helper.rb
36
35
  - lib/scaffolding_extensions/meta_controller.rb
37
36
  - lib/scaffolding_extensions/meta_model.rb
38
37
  - lib/scaffolding_extensions/model.rb
39
- - lib/scaffolding_extensions/model/active_record.rb
40
- - lib/scaffolding_extensions/model/sequel.rb
41
38
  - lib/scaffolding_extensions/overridable.rb
42
39
  - lib/scaffolding_extensions/prototype_helper.rb
40
+ - lib/scaffolding_extensions/controller.rb
43
41
  - lib/scaffolding_extensions/rails_test_help.rb
44
- - doc/advanced.txt
42
+ - lib/scaffolding_extensions/helper.rb
43
+ - lib/scaffolding_extensions.rb
44
+ - doc/merb.txt
45
45
  - doc/camping.txt
46
46
  - doc/controller_spec.txt
47
47
  - doc/conversion.txt
@@ -49,7 +49,7 @@ files:
49
49
  - doc/ramaze.txt
50
50
  - doc/sinatra.txt
51
51
  - doc/testing.txt
52
- - doc/merb.txt
52
+ - doc/advanced.txt
53
53
  - contrib/scaffold_associations_tree/README
54
54
  - contrib/scaffold_associations_tree/bullet.gif
55
55
  - contrib/scaffold_associations_tree/minus.gif
@@ -63,7 +63,7 @@ files:
63
63
  - contrib/scaffold_jquery_autocomplete/README
64
64
  - contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.css
65
65
  - contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.js
66
- - scaffolds/edit.rhtml
66
+ - scaffolds/show.rhtml
67
67
  - scaffolds/habtm.rhtml
68
68
  - scaffolds/index.rhtml
69
69
  - scaffolds/layout.rhtml
@@ -73,7 +73,7 @@ files:
73
73
  - scaffolds/merge.rhtml
74
74
  - scaffolds/new.rhtml
75
75
  - scaffolds/search.rhtml
76
- - scaffolds/show.rhtml
76
+ - scaffolds/edit.rhtml
77
77
  has_rdoc: true
78
78
  homepage: http://scaffolding-ext.rubyforge.org/
79
79
  licenses: []
@@ -85,7 +85,7 @@ rdoc_options:
85
85
  - README
86
86
  - LICENSE
87
87
  - lib
88
- - doc/advanced.txt
88
+ - doc/merb.txt
89
89
  - doc/camping.txt
90
90
  - doc/controller_spec.txt
91
91
  - doc/conversion.txt
@@ -93,7 +93,7 @@ rdoc_options:
93
93
  - doc/ramaze.txt
94
94
  - doc/sinatra.txt
95
95
  - doc/testing.txt
96
- - doc/merb.txt
96
+ - doc/advanced.txt
97
97
  require_paths:
98
98
  - lib
99
99
  required_ruby_version: !ruby/object:Gem::Requirement