imaginable 0.0.5 → 0.1.0
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.textile +5 -4
- data/lib/imaginable/form_builder.rb +1 -1
- data/lib/imaginable/version.rb +1 -1
- metadata +8 -6
data/README.textile
CHANGED
@@ -6,6 +6,8 @@ h2. Compatibility
|
|
6
6
|
|
7
7
|
Imaginable is currently only compatible with Rails 3
|
8
8
|
|
9
|
+
Imaginable requires that you use jQuery. You can do this easily with the jquery-rails gem.
|
10
|
+
|
9
11
|
h2. Installation
|
10
12
|
|
11
13
|
Simply add Imaginable to your Gemfile and bundle it up:
|
@@ -67,7 +69,7 @@ Finally we just need to add a field to our form, which let's the user upload a p
|
|
67
69
|
</div>
|
68
70
|
<div class="field">
|
69
71
|
<%= f.label :photo %><br />
|
70
|
-
<%= f.image_field :photo %>
|
72
|
+
<%= f.image_field :photo, :format => 'square' %>
|
71
73
|
</div>
|
72
74
|
<div class="actions">
|
73
75
|
<%= f.submit %>
|
@@ -80,8 +82,7 @@ Here is an example of what you could do, if you had a @yield(:head)@ in the @hea
|
|
80
82
|
|
81
83
|
<pre>
|
82
84
|
<% content_for(:head) do %>
|
83
|
-
<%=
|
84
|
-
<%= javascript_include_tag 'imaginable' %>
|
85
|
+
<%= imaginable_includes_tag %>
|
85
86
|
<% end %>
|
86
87
|
</pre>
|
87
88
|
|
@@ -110,5 +111,5 @@ The method will have the name that you have configured in your model.
|
|
110
111
|
In the above examples, this would be @@article.photo@.
|
111
112
|
|
112
113
|
<pre>
|
113
|
-
<%= image_tag @article.photo.url(:width => 500) %>
|
114
|
+
<%= image_tag @article.photo.url(:format => 'square', :width => 500) %>
|
114
115
|
</pre>
|
@@ -45,7 +45,7 @@ module Imaginable
|
|
45
45
|
sub_tag_text = build_imaginable_crop_content(options)
|
46
46
|
|
47
47
|
if has_existing_image
|
48
|
-
sub_tag_text << tag('img', :id => "#{dom_prefix}_preview_image", :src => image.url(:format => options[:format], :width => options[:preview_width]), :class => "imaginable_preview_image")
|
48
|
+
sub_tag_text << tag('img', :id => "#{dom_prefix}_preview_image", :src => image.url(:format => options[:format], :width => options[:preview_width], :height => options[:preview_height]), :class => "imaginable_preview_image")
|
49
49
|
else
|
50
50
|
sub_tag_text << tag('img', :id => "#{dom_prefix}_preview_image", :src => '/images/blank.gif', :style => 'display:none;', :class => "imaginable_preview_image")
|
51
51
|
end
|
data/lib/imaginable/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imaginable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.5
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thomas Dippel
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-12 00:00:00 +02:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rails
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- lib/imaginable/railtie.rb
|
110
111
|
- lib/imaginable/schema.rb
|
111
112
|
- lib/imaginable/version.rb
|
113
|
+
has_rdoc: true
|
112
114
|
homepage: http://rubygems.org/gems/imaginable
|
113
115
|
licenses: []
|
114
116
|
|
@@ -138,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
140
|
requirements: []
|
139
141
|
|
140
142
|
rubyforge_project:
|
141
|
-
rubygems_version: 1.7
|
143
|
+
rubygems_version: 1.3.7
|
142
144
|
signing_key:
|
143
145
|
specification_version: 3
|
144
146
|
summary: A gem for hooking a rails application up to the imagine image-server.
|