merb_activerecord 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ GEM_EMAIL = "canadaduane@gmail.com"
17
17
 
18
18
  GEM_NAME = "merb_activerecord"
19
19
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
20
- GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
20
+ GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.5") + PKG_BUILD
21
21
 
22
22
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
23
 
@@ -35,7 +35,7 @@ spec = Gem::Specification.new do |s|
35
35
  s.author = GEM_AUTHOR
36
36
  s.email = GEM_EMAIL
37
37
  s.homepage = PROJECT_URL
38
- s.add_dependency('merb-core', '>= 0.9.4')
38
+ s.add_dependency('merb-core', '>= 0.9.5')
39
39
  s.require_path = 'lib'
40
40
  s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*") end
41
41
 
@@ -1,23 +1,27 @@
1
1
  class <%= class_name %> < Application
2
2
  # provides :xml, :yaml, :js
3
3
 
4
+ # GET /<%= resource_path %>
4
5
  def index
5
6
  @<%= plural_model %> = <%= model_class_name %>.find(:all)
6
7
  display @<%= plural_model %>
7
8
  end
8
9
 
10
+ # GET /<%= resource_path %>/:id
9
11
  def show
10
12
  @<%= singular_model %> = <%= model_class_name %>.find_by_id(params[:id])
11
13
  raise NotFound unless @<%= singular_model %>
12
14
  display @<%= singular_model %>
13
15
  end
14
16
 
17
+ # GET /<%= resource_path %>/new
15
18
  def new
16
19
  only_provides :html
17
20
  @<%= singular_model %> = <%= model_class_name %>.new(params[:<%= singular_model %>])
18
21
  render
19
22
  end
20
23
 
24
+ # POST /<%= resource_path %>
21
25
  def create
22
26
  @<%= singular_model %> = <%= model_class_name %>.new(params[:<%= singular_model %>])
23
27
  if @<%= singular_model %>.save
@@ -27,6 +31,7 @@ class <%= class_name %> < Application
27
31
  end
28
32
  end
29
33
 
34
+ # GET /<%= resource_path %>/:id/edit
30
35
  def edit
31
36
  only_provides :html
32
37
  @<%= singular_model %> = <%= model_class_name %>.find_by_id(params[:id])
@@ -34,6 +39,7 @@ class <%= class_name %> < Application
34
39
  render
35
40
  end
36
41
 
42
+ # PUT /<%= resource_path %>/:id
37
43
  def update
38
44
  @<%= singular_model %> = <%= model_class_name %>.find_by_id(params[:id])
39
45
  raise NotFound unless @<%= singular_model %>
@@ -44,6 +50,7 @@ class <%= class_name %> < Application
44
50
  end
45
51
  end
46
52
 
53
+ # DELETE /<%= resource_path %>/:id
47
54
  def destroy
48
55
  @<%= singular_model %> = <%= model_class_name %>.find_by_id(params[:id])
49
56
  raise NotFound unless @<%= singular_model %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duane Johnson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-13 00:00:00 +03:00
12
+ date: 2008-08-21 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.4
23
+ version: 0.9.5
24
24
  version:
25
25
  description: Merb plugin that provides ActiveRecord support for Merb
26
26
  email: canadaduane@gmail.com