lipsiadmin 3.1 → 3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 2009-03-10
2
+ * Bump to version 3.2
3
+ * Fixed a problem with has_one_attachment
4
+ * Fixed few typo in api doc for attachments
5
+
1
6
  2009-03-05
2
7
  * Bump to version 3.1
3
8
  * Added a base login page for frontend
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/gempackagetask'
7
7
  require 'rake/contrib/sshpublisher'
8
8
 
9
9
  PKG_NAME = 'lipsiadmin'
10
- PKG_VERSION = "3.1"
10
+ PKG_VERSION = "3.2"
11
11
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
12
12
 
13
13
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
@@ -37,7 +37,12 @@ module Lipsiadmin
37
37
  #
38
38
  # Then in your form (with multipart) you can simply add:
39
39
  #
40
- # =file_field :mymodel, :image_attributes
40
+ # =file_field_tag "yourmodel[image_attributes][file]"
41
+ #
42
+ # or
43
+ #
44
+ # -fields_for "yourmodel[image_attributes][file]", @yourmodel.build_image do |image|
45
+ # =image.file_field :file
41
46
  #
42
47
  def has_one_attachment(name, options={})
43
48
  options[:as] ||= :attacher
@@ -73,7 +78,7 @@ module Lipsiadmin
73
78
  if file_column = self.send(name)
74
79
  file_column.update_attributes(attributes)
75
80
  else
76
- self.send(name).build(attributes)
81
+ self.send("build_#{name}", attributes)
77
82
  end
78
83
 
79
84
  end
@@ -91,7 +96,7 @@ module Lipsiadmin
91
96
  #
92
97
  # Then in your form (with multipart) you can simply add:
93
98
  #
94
- # =fields_for "yourmodel[attachments_attributes][]", @yourmodel.images.build do |image|
99
+ # -fields_for "yourmodel[images_attributes][]", @yourmodel.images.build do |image|
95
100
  # =image.file_field :file
96
101
  #
97
102
  def has_many_attachments(name, options = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipsiadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: "3.1"
4
+ version: "3.2"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide D'Agostino
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-05 00:00:00 +01:00
12
+ date: 2009-03-10 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15