enju_message 0.1.0 → 0.1.1
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/MIT-LICENSE +1 -1
- data/Rakefile +11 -0
- data/app/controllers/messages_controller.rb +4 -6
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +2 -2
data/MIT-LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -34,3 +34,14 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
34
34
|
end
|
35
35
|
|
36
36
|
task :default => :spec
|
37
|
+
require 'rake/testtask'
|
38
|
+
|
39
|
+
Rake::TestTask.new(:test) do |t|
|
40
|
+
t.libs << 'lib'
|
41
|
+
t.libs << 'test'
|
42
|
+
t.pattern = 'test/**/*_test.rb'
|
43
|
+
t.verbose = false
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
task :default => :test
|
@@ -33,7 +33,7 @@ class MessagesController < ApplicationController
|
|
33
33
|
@messages = search.execute!.results
|
34
34
|
|
35
35
|
respond_to do |format|
|
36
|
-
format.html # index.
|
36
|
+
format.html # index.html.erb
|
37
37
|
format.json { render :json => @messages }
|
38
38
|
format.rss
|
39
39
|
format.atom
|
@@ -47,7 +47,7 @@ class MessagesController < ApplicationController
|
|
47
47
|
@message.sm_read!
|
48
48
|
|
49
49
|
respond_to do |format|
|
50
|
-
format.html # show.
|
50
|
+
format.html # show.html.erb
|
51
51
|
format.json { render :json => @message }
|
52
52
|
end
|
53
53
|
end
|
@@ -83,8 +83,7 @@ class MessagesController < ApplicationController
|
|
83
83
|
|
84
84
|
respond_to do |format|
|
85
85
|
if @message.save
|
86
|
-
|
87
|
-
format.html { redirect_to messages_url }
|
86
|
+
format.html { redirect_to messages_url, :notice => t('controller.successfully_created', :model => t('activerecord.models.message')) }
|
88
87
|
format.json { render :json => @message, :status => :created, :location => @message }
|
89
88
|
else
|
90
89
|
format.html { render :action => "new" }
|
@@ -99,8 +98,7 @@ class MessagesController < ApplicationController
|
|
99
98
|
@message = current_user.received_messages.find(params[:id])
|
100
99
|
|
101
100
|
if @message.update_attributes(params[:message])
|
102
|
-
|
103
|
-
format.html { redirect_to @message }
|
101
|
+
format.html { redirect_to @message, :notice => t('controller.successfully_updated', :model => t('activerecord.models.message')) }
|
104
102
|
format.json { head :no_content }
|
105
103
|
else
|
106
104
|
format.html { render :action => "edit" }
|
data/lib/enju_message/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_message
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-
|
12
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|