sogilis-moxie_forum 0.2.8 → 0.2.9

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.
@@ -30,14 +30,14 @@ module Moxie
30
30
 
31
31
  @post = Post.new( post_params )
32
32
 
33
- respond_to do |format|
34
- if @post.save
35
- format.html { redirect_to( moxie_topic_path( @post.topic ),
36
- :notice => 'Post was successfully created.') }
37
- else
38
- format.html { render :action => "new" }
39
- end
33
+ if @post.save
34
+ notice = 'Post was successfully created.'
35
+ else
36
+ notice = 'Post was not created.'
40
37
  end
38
+
39
+ redirect_to moxie_topic_path( @post.topic ),
40
+ :notice => notice
41
41
  end
42
42
  end
43
43
 
@@ -11,7 +11,8 @@ module Moxie
11
11
  belongs_to :topic
12
12
  belongs_to :author, :class_name => user_model
13
13
 
14
- validates :body, :presence => true
14
+ validates :body, :presence => true,
15
+ :length => { :maximum => 1000 }
15
16
 
16
17
  after_create :increment_topic_post_count
17
18
  before_destroy :decrement_topic_post_count
@@ -31,4 +32,4 @@ module Moxie
31
32
  end
32
33
 
33
34
  end
34
- end
35
+ end
@@ -23,6 +23,8 @@
23
23
  <div class="m_body">
24
24
  <div class="m_prompt field"><%= f.label :body, "Add a reply #{moxie_post_name}" %></div>
25
25
  <%= f.text_area :body %>
26
+ <br />
27
+ <span>1000 characters or less</span>
26
28
  </div>
27
29
 
28
30
  <%= hidden_field_tag 'moxie_post[topic_id]', @topic.id %>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 8
9
- version: 0.2.8
8
+ - 9
9
+ version: 0.2.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Keith Schacht, Guillaume Hammadi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-02-15 00:00:00 +01:00
17
+ date: 2011-02-16 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20