wnm_support 0.0.5 → 0.0.6
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.md
CHANGED
@@ -95,13 +95,6 @@ And then execute:
|
|
95
95
|
video = youtube_video(url, 100, 200)
|
96
96
|
video # => <object width='100' height='200'><param url='youtube.com/v/lala'>...</object>
|
97
97
|
|
98
|
-
# use inside form_group
|
99
|
-
<%= form_group t("sample.title") do %>
|
100
|
-
<%= f.fields_for :some_attributes do |builder| %>
|
101
|
-
<%= render :partial => 'some_partial_with_inputs_to_add', :locals => {:f => builder} %>
|
102
|
-
<% end %>
|
103
|
-
<%= link_to_add_fields t("sample.add_title"), f, :some_attributes %>
|
104
|
-
<% end %>
|
105
98
|
|
106
99
|
## Contributing
|
107
100
|
|
data/changelog.md
CHANGED
data/lib/wnm_support.rb
CHANGED
@@ -20,6 +20,5 @@ require "wnm_support/active_record_ext/mysql_order_by_field"
|
|
20
20
|
|
21
21
|
require "wnm_support/view_helpers/bool_to_human"
|
22
22
|
require "wnm_support/view_helpers/youtube"
|
23
|
-
require "wnm_support/view_helpers/link_to_add_fields"
|
24
23
|
|
25
24
|
require "wnm_support/railtie" if defined?(Rails)
|
data/lib/wnm_support/railtie.rb
CHANGED
data/lib/wnm_support/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wnm_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -156,7 +156,6 @@ files:
|
|
156
156
|
- lib/wnm_support/railtie.rb
|
157
157
|
- lib/wnm_support/version.rb
|
158
158
|
- lib/wnm_support/view_helpers/bool_to_human.rb
|
159
|
-
- lib/wnm_support/view_helpers/link_to_add_fields.rb
|
160
159
|
- lib/wnm_support/view_helpers/youtube.rb
|
161
160
|
- spec/spec_helper.rb
|
162
161
|
- spec/wnm_support/activer_record_ext/destroy_validation_spec.rb
|
@@ -172,7 +171,6 @@ files:
|
|
172
171
|
- spec/wnm_support/core_ext/string_spec.rb
|
173
172
|
- spec/wnm_support/core_ext/true_class_spec.rb
|
174
173
|
- spec/wnm_support/view_helpers/bool_to_human_spec.rb
|
175
|
-
- spec/wnm_support/view_helpers/link_to_add_fields_spec.rb
|
176
174
|
- spec/wnm_support/view_helpers/youtube_spec.rb
|
177
175
|
- wnm_support.gemspec
|
178
176
|
homepage: https://github.com/mirrec/wnm_support
|
@@ -214,5 +212,4 @@ test_files:
|
|
214
212
|
- spec/wnm_support/core_ext/string_spec.rb
|
215
213
|
- spec/wnm_support/core_ext/true_class_spec.rb
|
216
214
|
- spec/wnm_support/view_helpers/bool_to_human_spec.rb
|
217
|
-
- spec/wnm_support/view_helpers/link_to_add_fields_spec.rb
|
218
215
|
- spec/wnm_support/view_helpers/youtube_spec.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module WnmSupport
|
2
|
-
module ViewHelpers
|
3
|
-
module LinkToAddFields
|
4
|
-
def link_to_add_fields(name, f, association)
|
5
|
-
new_object = f.object.send(association).klass.new
|
6
|
-
id = new_object.object_id
|
7
|
-
fields = f.fields_for(association, new_object, {:child_index => id}) do |builder|
|
8
|
-
render(association.to_s.singularize + "_fields", {:f => builder})
|
9
|
-
end
|
10
|
-
link_to(name, '#', :class => "add_fields", :data => {:id => id, :fields => fields.gsub("\n", "")})
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
File without changes
|