email_manager 0.0.3 → 0.0.4

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/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.4
2
+
3
+ * Fixed minor issues in the controller
4
+
1
5
  == 0.0.3
2
6
 
3
7
  * Added a generator to override the controller and views
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -20,9 +20,10 @@ module EmailManager
20
20
 
21
21
  # Paginate with kaminari
22
22
  begin
23
- @managed_emails = Kaminari.paginate_array(@search.each)#.page(params[:page])
23
+ @managed_emails = Kaminari.paginate_array(@search.each).page(params[:page])
24
24
  @pagination_enabled = true
25
- rescue NameError
25
+ rescue NameError => e
26
+ puts e
26
27
  @managed_emails = @search
27
28
  @pagination_enabled = false
28
29
  end
@@ -35,7 +36,7 @@ module EmailManager
35
36
  # shows a single managed email's body text
36
37
  # @param [String] id The id of the selected managed email
37
38
  def show
38
- @managed_email = ManagedEmail.find_by_id(params[:id])
39
+ @managed_email = EmailManager::ManagedEmail.find_by_id(params[:id])
39
40
 
40
41
  respond_to do |format|
41
42
  format.html
@@ -43,7 +44,7 @@ module EmailManager
43
44
  end
44
45
 
45
46
  def body
46
- @managed_email = ManagedEmail.find_by_id(params[:id])
47
+ @managed_email = EmailManager::ManagedEmail.find_by_id(params[:id])
47
48
 
48
49
  respond_to do |format|
49
50
  format.html { render :text => @managed_email.body }
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{email_manager}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Jeremiah Hemphill}]
@@ -42,9 +42,11 @@ describe EmailManager::ManagedEmailsController do
42
42
  it "should attempt to use kaminari" do
43
43
  # fun hack to allow us to stub the Kaminari.paginate_array method
44
44
  class Kaminari
45
+ def page(args)
46
+ [@managed_email]
47
+ end
45
48
  end
46
- Kaminari.should_receive(:paginate_array).and_return([@managed_email])
47
-
49
+ Kaminari.should_receive(:paginate_array).and_return(Kaminari.new)
48
50
  get :index
49
51
  assigns[:pagination_enabled].should be_true
50
52
  end
Binary file
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: email_manager
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeremiah Hemphill
@@ -241,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  requirements:
242
242
  - - ">="
243
243
  - !ruby/object:Gem::Version
244
- hash: 4090985342549708386
244
+ hash: -2074967605751505543
245
245
  segments:
246
246
  - 0
247
247
  version: "0"