content_engine 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/README +1 -0
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/content_engine.gemspec +3 -118
  5. metadata +6 -117
  6. data/Gemfile +0 -40
  7. data/README.md +0 -43
  8. data/app/controllers/content_engine/articles_controller.rb +0 -54
  9. data/app/controllers/content_engine/pages_controller.rb +0 -76
  10. data/app/controllers/content_engine_controller.rb +0 -14
  11. data/app/helpers/application_helper.rb +0 -2
  12. data/app/models/article.rb +0 -29
  13. data/app/models/content.rb +0 -64
  14. data/app/models/page.rb +0 -40
  15. data/app/models/site.rb +0 -26
  16. data/app/models/tag.rb +0 -53
  17. data/app/models/user.rb +0 -5
  18. data/app/views/content_engine/articles/_form.erb +0 -8
  19. data/app/views/content_engine/articles/edit.html.erb +0 -7
  20. data/app/views/content_engine/articles/index.html.erb +0 -10
  21. data/app/views/content_engine/articles/new.html.erb +0 -6
  22. data/app/views/content_engine/articles/show.html.erb +0 -9
  23. data/app/views/content_engine/pages/_form.erb +0 -8
  24. data/app/views/content_engine/pages/edit.html.erb +0 -7
  25. data/app/views/content_engine/pages/index.html.erb +0 -10
  26. data/app/views/content_engine/pages/new.html.erb +0 -6
  27. data/app/views/content_engine/pages/show.html.erb +0 -9
  28. data/app/views/layouts/application.html.erb +0 -16
  29. data/config/application.rb +0 -1
  30. data/config/locales/en.yml +0 -5
  31. data/config/routes.rb +0 -25
  32. data/db/migrate/20100225105011_create_contents.rb +0 -22
  33. data/db/migrate/20100225105903_create_users.rb +0 -8
  34. data/db/migrate/20100225110024_create_sites.rb +0 -15
  35. data/db/migrate/20100225110037_create_memberships.rb +0 -12
  36. data/db/migrate/20100225112236_acts_as_taggable_on.rb +0 -26
  37. data/db/schema.rb +0 -58
  38. data/lib/content_engine.rb +0 -24
  39. data/lib/tasks/content_engine.rake +0 -24
  40. data/spec/blueprint.rb +0 -41
  41. data/spec/models/article_spec.rb +0 -56
  42. data/spec/models/page_spec.rb +0 -158
  43. data/spec/models/site_spec.rb +0 -32
  44. data/spec/rails_app/.gitignore +0 -4
  45. data/spec/rails_app/Rakefile +0 -10
  46. data/spec/rails_app/app/controllers/admins_controller.rb +0 -6
  47. data/spec/rails_app/app/controllers/application_controller.rb +0 -6
  48. data/spec/rails_app/app/controllers/home_controller.rb +0 -4
  49. data/spec/rails_app/app/controllers/sessions_controller.rb +0 -6
  50. data/spec/rails_app/app/controllers/users_controller.rb +0 -12
  51. data/spec/rails_app/app/helpers/application_helper.rb +0 -3
  52. data/spec/rails_app/app/views/home/index.html.erb +0 -1
  53. data/spec/rails_app/app/views/layouts/application.html.erb +0 -19
  54. data/spec/rails_app/config.ru +0 -4
  55. data/spec/rails_app/config/application.rb +0 -30
  56. data/spec/rails_app/config/boot.rb +0 -9
  57. data/spec/rails_app/config/database.yml +0 -16
  58. data/spec/rails_app/config/environment.rb +0 -5
  59. data/spec/rails_app/config/environments/development.rb +0 -19
  60. data/spec/rails_app/config/environments/production.rb +0 -33
  61. data/spec/rails_app/config/environments/test.rb +0 -29
  62. data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  63. data/spec/rails_app/config/initializers/cookie_verification_secret.rb +0 -7
  64. data/spec/rails_app/config/initializers/inflections.rb +0 -2
  65. data/spec/rails_app/config/initializers/session_store.rb +0 -15
  66. data/spec/rails_app/config/routes.rb +0 -21
  67. data/spec/rails_app/db/migrate/20100225105011_create_contents.rb +0 -22
  68. data/spec/rails_app/db/migrate/20100225105903_create_users.rb +0 -8
  69. data/spec/rails_app/db/migrate/20100225110024_create_sites.rb +0 -15
  70. data/spec/rails_app/db/migrate/20100225110037_create_memberships.rb +0 -12
  71. data/spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb +0 -26
  72. data/spec/rails_app/db/schema.rb +0 -59
  73. data/spec/rails_app/public/404.html +0 -26
  74. data/spec/rails_app/public/422.html +0 -26
  75. data/spec/rails_app/public/500.html +0 -26
  76. data/spec/rails_app/public/favicon.ico +0 -0
  77. data/spec/rails_app/public/images/rails.png +0 -0
  78. data/spec/rails_app/public/javascripts/application.js +0 -2
  79. data/spec/rails_app/public/javascripts/controls.js +0 -963
  80. data/spec/rails_app/public/javascripts/dragdrop.js +0 -973
  81. data/spec/rails_app/public/javascripts/effects.js +0 -1128
  82. data/spec/rails_app/public/javascripts/prototype.js +0 -4320
  83. data/spec/rails_app/public/javascripts/rails.js +0 -110
  84. data/spec/rails_app/public/robots.txt +0 -5
  85. data/spec/rails_app/public/stylesheets/.gitkeep +0 -0
  86. data/spec/rails_app/script/rails +0 -10
  87. data/spec/requests/user_manage_articles_spec.rb +0 -85
  88. data/spec/requests/user_manage_pages_spec.rb +0 -92
  89. data/spec/requests/webrat.log +0 -17
  90. data/spec/spec.opts +0 -2
  91. data/spec/spec_helper.rb +0 -36
data/README ADDED
@@ -0,0 +1 @@
1
+ This is private
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../spec/rails_app/config/application', __FILE__)
4
+ # require File.expand_path('../spec/rails_app/config/application', __FILE__)
5
5
 
6
6
  require 'rake'
7
7
  require 'rake/testtask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{content_engine}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Taylor Luk"]
@@ -13,134 +13,19 @@ Gem::Specification.new do |s|
13
13
  s.description = %q{Extracted from shop2, site-rest}
14
14
  s.email = %q{taylor.luk@idealian.net}
15
15
  s.extra_rdoc_files = [
16
- "README.md"
16
+ "README"
17
17
  ]
18
18
  s.files = [
19
19
  ".gitignore",
20
- "Gemfile",
21
- "README.md",
22
20
  "Rakefile",
23
21
  "VERSION",
24
- "app/controllers/content_engine/articles_controller.rb",
25
- "app/controllers/content_engine/pages_controller.rb",
26
- "app/controllers/content_engine_controller.rb",
27
- "app/helpers/application_helper.rb",
28
- "app/models/article.rb",
29
- "app/models/content.rb",
30
- "app/models/page.rb",
31
- "app/models/site.rb",
32
- "app/models/tag.rb",
33
- "app/models/user.rb",
34
- "app/views/content_engine/articles/_form.erb",
35
- "app/views/content_engine/articles/edit.html.erb",
36
- "app/views/content_engine/articles/index.html.erb",
37
- "app/views/content_engine/articles/new.html.erb",
38
- "app/views/content_engine/articles/show.html.erb",
39
- "app/views/content_engine/pages/_form.erb",
40
- "app/views/content_engine/pages/edit.html.erb",
41
- "app/views/content_engine/pages/index.html.erb",
42
- "app/views/content_engine/pages/new.html.erb",
43
- "app/views/content_engine/pages/show.html.erb",
44
- "app/views/layouts/application.html.erb",
45
- "config/application.rb",
46
- "config/locales/en.yml",
47
- "config/routes.rb",
48
- "content_engine.gemspec",
49
- "db/migrate/20100225105011_create_contents.rb",
50
- "db/migrate/20100225105903_create_users.rb",
51
- "db/migrate/20100225110024_create_sites.rb",
52
- "db/migrate/20100225110037_create_memberships.rb",
53
- "db/migrate/20100225112236_acts_as_taggable_on.rb",
54
- "db/schema.rb",
55
- "lib/content_engine.rb",
56
- "lib/tasks/content_engine.rake",
57
- "spec/blueprint.rb",
58
- "spec/models/article_spec.rb",
59
- "spec/models/page_spec.rb",
60
- "spec/models/site_spec.rb",
61
- "spec/rails_app/.gitignore",
62
- "spec/rails_app/Rakefile",
63
- "spec/rails_app/app/controllers/application_controller.rb",
64
- "spec/rails_app/app/controllers/home_controller.rb",
65
- "spec/rails_app/app/helpers/application_helper.rb",
66
- "spec/rails_app/app/views/home/index.html.erb",
67
- "spec/rails_app/app/views/layouts/application.html.erb",
68
- "spec/rails_app/config.ru",
69
- "spec/rails_app/config/application.rb",
70
- "spec/rails_app/config/boot.rb",
71
- "spec/rails_app/config/database.yml",
72
- "spec/rails_app/config/environment.rb",
73
- "spec/rails_app/config/environments/development.rb",
74
- "spec/rails_app/config/environments/production.rb",
75
- "spec/rails_app/config/environments/test.rb",
76
- "spec/rails_app/config/initializers/backtrace_silencers.rb",
77
- "spec/rails_app/config/initializers/cookie_verification_secret.rb",
78
- "spec/rails_app/config/initializers/inflections.rb",
79
- "spec/rails_app/config/initializers/session_store.rb",
80
- "spec/rails_app/config/routes.rb",
81
- "spec/rails_app/db/migrate/20100225105011_create_contents.rb",
82
- "spec/rails_app/db/migrate/20100225105903_create_users.rb",
83
- "spec/rails_app/db/migrate/20100225110024_create_sites.rb",
84
- "spec/rails_app/db/migrate/20100225110037_create_memberships.rb",
85
- "spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb",
86
- "spec/rails_app/db/schema.rb",
87
- "spec/rails_app/public/404.html",
88
- "spec/rails_app/public/422.html",
89
- "spec/rails_app/public/500.html",
90
- "spec/rails_app/public/favicon.ico",
91
- "spec/rails_app/public/images/rails.png",
92
- "spec/rails_app/public/javascripts/application.js",
93
- "spec/rails_app/public/javascripts/controls.js",
94
- "spec/rails_app/public/javascripts/dragdrop.js",
95
- "spec/rails_app/public/javascripts/effects.js",
96
- "spec/rails_app/public/javascripts/prototype.js",
97
- "spec/rails_app/public/javascripts/rails.js",
98
- "spec/rails_app/public/robots.txt",
99
- "spec/rails_app/public/stylesheets/.gitkeep",
100
- "spec/rails_app/script/rails",
101
- "spec/requests/user_manage_articles_spec.rb",
102
- "spec/requests/user_manage_pages_spec.rb",
103
- "spec/requests/webrat.log",
104
- "spec/spec.opts",
105
- "spec/spec_helper.rb"
22
+ "content_engine.gemspec"
106
23
  ]
107
24
  s.homepage = %q{http://github.com/idealian/content_engine}
108
25
  s.rdoc_options = ["--charset=UTF-8"]
109
26
  s.require_paths = ["lib"]
110
27
  s.rubygems_version = %q{1.3.6}
111
28
  s.summary = %q{A Rails 3 Engine for sexier site and content management}
112
- s.test_files = [
113
- "spec/blueprint.rb",
114
- "spec/models/article_spec.rb",
115
- "spec/models/page_spec.rb",
116
- "spec/models/site_spec.rb",
117
- "spec/rails_app/app/controllers/admins_controller.rb",
118
- "spec/rails_app/app/controllers/application_controller.rb",
119
- "spec/rails_app/app/controllers/home_controller.rb",
120
- "spec/rails_app/app/controllers/sessions_controller.rb",
121
- "spec/rails_app/app/controllers/users_controller.rb",
122
- "spec/rails_app/app/helpers/application_helper.rb",
123
- "spec/rails_app/config/application.rb",
124
- "spec/rails_app/config/boot.rb",
125
- "spec/rails_app/config/environment.rb",
126
- "spec/rails_app/config/environments/development.rb",
127
- "spec/rails_app/config/environments/production.rb",
128
- "spec/rails_app/config/environments/test.rb",
129
- "spec/rails_app/config/initializers/backtrace_silencers.rb",
130
- "spec/rails_app/config/initializers/cookie_verification_secret.rb",
131
- "spec/rails_app/config/initializers/inflections.rb",
132
- "spec/rails_app/config/initializers/session_store.rb",
133
- "spec/rails_app/config/routes.rb",
134
- "spec/rails_app/db/migrate/20100225105011_create_contents.rb",
135
- "spec/rails_app/db/migrate/20100225105903_create_users.rb",
136
- "spec/rails_app/db/migrate/20100225110024_create_sites.rb",
137
- "spec/rails_app/db/migrate/20100225110037_create_memberships.rb",
138
- "spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb",
139
- "spec/rails_app/db/schema.rb",
140
- "spec/requests/user_manage_articles_spec.rb",
141
- "spec/requests/user_manage_pages_spec.rb",
142
- "spec/spec_helper.rb"
143
- ]
144
29
 
145
30
  if s.respond_to? :specification_version then
146
31
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Taylor Luk
@@ -74,95 +74,13 @@ executables: []
74
74
  extensions: []
75
75
 
76
76
  extra_rdoc_files:
77
- - README.md
77
+ - README
78
78
  files:
79
79
  - .gitignore
80
- - Gemfile
81
- - README.md
82
80
  - Rakefile
83
81
  - VERSION
84
- - app/controllers/content_engine/articles_controller.rb
85
- - app/controllers/content_engine/pages_controller.rb
86
- - app/controllers/content_engine_controller.rb
87
- - app/helpers/application_helper.rb
88
- - app/models/article.rb
89
- - app/models/content.rb
90
- - app/models/page.rb
91
- - app/models/site.rb
92
- - app/models/tag.rb
93
- - app/models/user.rb
94
- - app/views/content_engine/articles/_form.erb
95
- - app/views/content_engine/articles/edit.html.erb
96
- - app/views/content_engine/articles/index.html.erb
97
- - app/views/content_engine/articles/new.html.erb
98
- - app/views/content_engine/articles/show.html.erb
99
- - app/views/content_engine/pages/_form.erb
100
- - app/views/content_engine/pages/edit.html.erb
101
- - app/views/content_engine/pages/index.html.erb
102
- - app/views/content_engine/pages/new.html.erb
103
- - app/views/content_engine/pages/show.html.erb
104
- - app/views/layouts/application.html.erb
105
- - config/application.rb
106
- - config/locales/en.yml
107
- - config/routes.rb
108
82
  - content_engine.gemspec
109
- - db/migrate/20100225105011_create_contents.rb
110
- - db/migrate/20100225105903_create_users.rb
111
- - db/migrate/20100225110024_create_sites.rb
112
- - db/migrate/20100225110037_create_memberships.rb
113
- - db/migrate/20100225112236_acts_as_taggable_on.rb
114
- - db/schema.rb
115
- - lib/content_engine.rb
116
- - lib/tasks/content_engine.rake
117
- - spec/blueprint.rb
118
- - spec/models/article_spec.rb
119
- - spec/models/page_spec.rb
120
- - spec/models/site_spec.rb
121
- - spec/rails_app/.gitignore
122
- - spec/rails_app/Rakefile
123
- - spec/rails_app/app/controllers/application_controller.rb
124
- - spec/rails_app/app/controllers/home_controller.rb
125
- - spec/rails_app/app/helpers/application_helper.rb
126
- - spec/rails_app/app/views/home/index.html.erb
127
- - spec/rails_app/app/views/layouts/application.html.erb
128
- - spec/rails_app/config.ru
129
- - spec/rails_app/config/application.rb
130
- - spec/rails_app/config/boot.rb
131
- - spec/rails_app/config/database.yml
132
- - spec/rails_app/config/environment.rb
133
- - spec/rails_app/config/environments/development.rb
134
- - spec/rails_app/config/environments/production.rb
135
- - spec/rails_app/config/environments/test.rb
136
- - spec/rails_app/config/initializers/backtrace_silencers.rb
137
- - spec/rails_app/config/initializers/cookie_verification_secret.rb
138
- - spec/rails_app/config/initializers/inflections.rb
139
- - spec/rails_app/config/initializers/session_store.rb
140
- - spec/rails_app/config/routes.rb
141
- - spec/rails_app/db/migrate/20100225105011_create_contents.rb
142
- - spec/rails_app/db/migrate/20100225105903_create_users.rb
143
- - spec/rails_app/db/migrate/20100225110024_create_sites.rb
144
- - spec/rails_app/db/migrate/20100225110037_create_memberships.rb
145
- - spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb
146
- - spec/rails_app/db/schema.rb
147
- - spec/rails_app/public/404.html
148
- - spec/rails_app/public/422.html
149
- - spec/rails_app/public/500.html
150
- - spec/rails_app/public/favicon.ico
151
- - spec/rails_app/public/images/rails.png
152
- - spec/rails_app/public/javascripts/application.js
153
- - spec/rails_app/public/javascripts/controls.js
154
- - spec/rails_app/public/javascripts/dragdrop.js
155
- - spec/rails_app/public/javascripts/effects.js
156
- - spec/rails_app/public/javascripts/prototype.js
157
- - spec/rails_app/public/javascripts/rails.js
158
- - spec/rails_app/public/robots.txt
159
- - spec/rails_app/public/stylesheets/.gitkeep
160
- - spec/rails_app/script/rails
161
- - spec/requests/user_manage_articles_spec.rb
162
- - spec/requests/user_manage_pages_spec.rb
163
- - spec/requests/webrat.log
164
- - spec/spec.opts
165
- - spec/spec_helper.rb
83
+ - README
166
84
  has_rdoc: true
167
85
  homepage: http://github.com/idealian/content_engine
168
86
  licenses: []
@@ -193,34 +111,5 @@ rubygems_version: 1.3.6
193
111
  signing_key:
194
112
  specification_version: 3
195
113
  summary: A Rails 3 Engine for sexier site and content management
196
- test_files:
197
- - spec/blueprint.rb
198
- - spec/models/article_spec.rb
199
- - spec/models/page_spec.rb
200
- - spec/models/site_spec.rb
201
- - spec/rails_app/app/controllers/admins_controller.rb
202
- - spec/rails_app/app/controllers/application_controller.rb
203
- - spec/rails_app/app/controllers/home_controller.rb
204
- - spec/rails_app/app/controllers/sessions_controller.rb
205
- - spec/rails_app/app/controllers/users_controller.rb
206
- - spec/rails_app/app/helpers/application_helper.rb
207
- - spec/rails_app/config/application.rb
208
- - spec/rails_app/config/boot.rb
209
- - spec/rails_app/config/environment.rb
210
- - spec/rails_app/config/environments/development.rb
211
- - spec/rails_app/config/environments/production.rb
212
- - spec/rails_app/config/environments/test.rb
213
- - spec/rails_app/config/initializers/backtrace_silencers.rb
214
- - spec/rails_app/config/initializers/cookie_verification_secret.rb
215
- - spec/rails_app/config/initializers/inflections.rb
216
- - spec/rails_app/config/initializers/session_store.rb
217
- - spec/rails_app/config/routes.rb
218
- - spec/rails_app/db/migrate/20100225105011_create_contents.rb
219
- - spec/rails_app/db/migrate/20100225105903_create_users.rb
220
- - spec/rails_app/db/migrate/20100225110024_create_sites.rb
221
- - spec/rails_app/db/migrate/20100225110037_create_memberships.rb
222
- - spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb
223
- - spec/rails_app/db/schema.rb
224
- - spec/requests/user_manage_articles_spec.rb
225
- - spec/requests/user_manage_pages_spec.rb
226
- - spec/spec_helper.rb
114
+ test_files: []
115
+
data/Gemfile DELETED
@@ -1,40 +0,0 @@
1
- # Edit this Gemfile to bundle your application's dependencies.
2
- source 'http://gemcutter.org'
3
-
4
- gem "rails", "3.0.0.beta"
5
-
6
- ## Bundle edge rails:
7
- # gem "rails", :git => "git://github.com/rails/rails.git"
8
-
9
- # ActiveRecord requires a database adapter. By default,
10
- # Rails has selected sqlite3.
11
- gem "sqlite3-ruby", :require => "sqlite3"
12
-
13
- # Application dependencies
14
-
15
- gem "will_paginate"
16
- gem "rdiscount"
17
- gem "formtastic"
18
- gem "permalink_fu" , :git => 'git://github.com/idealian/permalink_fu.git'
19
- gem "acts-as-taggable-on", :git => 'git://github.com/fousa/acts-as-taggable-on.git'
20
-
21
-
22
- group :development do
23
- gem "launchy"
24
- gem "jeweler"
25
- end
26
-
27
- group :cucumber do
28
- gem 'webrat', :require => nil
29
- gem 'cucumber-rails', :git => 'git://github.com/aslakhellesoy/cucumber-rails.git'
30
- gem 'rspec-rails', :git => 'git://github.com/rspec/rspec-rails.git'
31
- end
32
-
33
- # bundler requires these gems while running tests
34
- group :test do
35
- gem 'test-unit', "1.2.3"
36
- gem 'machinist', :git => 'git://github.com/notahat/machinist.git'
37
- gem 'rspec-rails', :git => 'git://github.com/rspec/rspec-rails.git'
38
- gem 'webrat', :require => nil
39
- gem 'faker', :require => nil
40
- end
data/README.md DELETED
@@ -1,43 +0,0 @@
1
- Content Engine
2
- ===
3
-
4
- Rails3 Engine for awesome Site and content management
5
-
6
-
7
- Dependencies
8
- ---
9
- - Rails 3
10
- - Idealian UserEngine or existence of users table
11
-
12
- Install
13
- ---
14
-
15
- Add following to your Gemfile
16
-
17
- gem "permalink_fu" , :git => 'git://github.com/idealian/permalink_fu.git'
18
- gem "acts-as-taggable-on", :git => 'git://github.com/fousa/acts-as-taggable-on.git'
19
- gem "content_engine", :git => "git@github.com:idealian/content_engine.git"
20
-
21
- And run `bundle install`
22
-
23
- Features
24
- ---
25
- sites
26
- pages
27
- articles
28
- tags
29
-
30
- Customization
31
- ---
32
-
33
- To override a controller
34
-
35
- class PagesController < ContentEngine::PagesController
36
- def index
37
- end
38
-
39
- def show
40
- end
41
- end
42
-
43
- Copyright (c) 2010 Taylor Luk, Idealian Pty Ltd All right reserved
@@ -1,54 +0,0 @@
1
- module ContentEngine
2
- class ArticlesController < ContentEngineController
3
- respond_to :html, :xml
4
-
5
- # GET /articles
6
- # GET /articles.xml
7
- def index
8
- @articles = @site.articles.order('created_at desc').all.paginate(:page => params[:page])
9
- respond_with @articles
10
- end
11
-
12
- # GET /articles/1
13
- # GET /articles/1.xml
14
- def show
15
- respond_with @article = @site.articles.find(params[:id])
16
- end
17
-
18
- # GET /articles/new
19
- # GET /articles/new.xml
20
- def new
21
- respond_with @article = @site.articles.new
22
- end
23
-
24
- # GET /articles/1/edit
25
- def edit
26
- respond_with @article = @site.articles.find(params[:id])
27
- end
28
-
29
- # POST /articles
30
- # POST /articles.xml
31
- def create
32
- @article = @site.articles.new(params[:article])
33
- flash[:notice] = "Article was successfully created." if @article.save
34
- respond_with @article
35
- end
36
-
37
- # PUT /articles/1
38
- # PUT /articles/1.xml
39
- def update
40
- @article = @site.articles.find(params[:id])
41
- flash[:notice] = "Article was successfully updated." if @article.update_attributes(params[:article])
42
- respond_with @article
43
- end
44
-
45
- # DELETE /articles/1
46
- # DELETE /articles/1.xml
47
- def destroy
48
- @article = @site.articles.find(params[:id])
49
- @article.destroy
50
-
51
- respond_with @article
52
- end
53
- end
54
- end