sbdevcore 0.1.2 → 0.2.0

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.
Files changed (173) hide show
  1. data/app/assets/images/28DaysLater.ttf +0 -0
  2. data/app/assets/images/ajax-loader.gif +0 -0
  3. data/app/assets/javascripts/jquery.tools.min.js +16 -108
  4. data/app/assets/javascripts/rails.validations.custom.js +5 -0
  5. data/app/assets/javascripts/sbdev-ajax.js +14 -0
  6. data/app/assets/javascripts/sbdevcore-tools.js +24 -37
  7. data/app/assets/javascripts/sbdevcore.js +8 -3
  8. data/app/assets/javascripts/tiny_mce_config.js +2 -0
  9. data/app/assets/stylesheets/_bar_nav.scss +6 -4
  10. data/app/assets/stylesheets/_buttons.scss +16 -10
  11. data/app/assets/stylesheets/_forms.scss +51 -0
  12. data/app/assets/stylesheets/_mixins.scss +40 -15
  13. data/app/assets/stylesheets/_overlay.scss +4 -7
  14. data/app/assets/stylesheets/_sbdev_core.scss +55 -19
  15. data/app/assets/stylesheets/_yui_base.scss +142 -0
  16. data/app/controllers/contacts_controller.rb +2 -36
  17. data/app/controllers/downloadables_controller.rb +6 -46
  18. data/app/controllers/galleries_controller.rb +4 -49
  19. data/app/controllers/indices_controller.rb +2 -45
  20. data/app/controllers/photos_controller.rb +4 -48
  21. data/app/controllers/sbdev_core_controller.rb +40 -0
  22. data/app/controllers/texts_controller.rb +3 -46
  23. data/app/controllers/videos_controller.rb +4 -45
  24. data/app/models/contact.rb +5 -1
  25. data/app/models/downloadable.rb +3 -1
  26. data/app/models/index.rb +4 -1
  27. data/app/models/photo.rb +3 -1
  28. data/app/models/video.rb +2 -0
  29. data/app/views/admins/mailer/confirmation_instructions.html.haml +4 -0
  30. data/app/views/admins/mailer/reset_password_instructions.html.haml +6 -0
  31. data/app/views/admins/mailer/unlock_instructions.html.haml +5 -0
  32. data/app/views/admins/passwords/edit.html.haml +8 -0
  33. data/app/views/admins/passwords/new.html.haml +6 -0
  34. data/app/views/admins/sessions/new.html.haml +8 -0
  35. data/app/views/admins/shared/_links.haml +19 -0
  36. data/app/views/application/_header.html.haml +1 -0
  37. data/app/views/application/_secondary_nav.html.haml +3 -0
  38. data/app/views/contacts/_form.html.haml +5 -0
  39. data/app/views/contacts/edit.html.haml +6 -0
  40. data/app/views/contacts/index.html.haml +21 -0
  41. data/app/views/contacts/new.html.haml +2 -0
  42. data/app/views/contacts/show.html.haml +24 -0
  43. data/app/views/downloadables/_form.html.haml +6 -0
  44. data/app/views/downloadables/_show.html.haml +7 -0
  45. data/app/views/downloadables/edit.html.haml +3 -0
  46. data/app/views/downloadables/new.html.haml +4 -0
  47. data/app/views/galleries/_form.html.haml +22 -0
  48. data/app/views/galleries/edit.html.haml +10 -0
  49. data/app/views/galleries/index.html.haml +9 -0
  50. data/app/views/galleries/new.html.haml +3 -0
  51. data/app/views/galleries/show.html.haml +9 -0
  52. data/app/views/indices/_form.html.haml +43 -0
  53. data/app/views/indices/_show.html.haml +17 -0
  54. data/app/views/indices/edit.html.haml +3 -0
  55. data/app/views/indices/index.html.haml +17 -0
  56. data/app/views/layouts/application.html.haml +16 -1
  57. data/app/views/layouts/bar_nav.html.haml +7 -14
  58. data/app/views/layouts/sbdev_core.html.haml +39 -0
  59. data/app/views/layouts/tab_nav.html.haml +9 -14
  60. data/app/views/mailer/message.haml +4 -0
  61. data/app/views/photos/_form.html.haml +10 -0
  62. data/app/views/photos/_show.html.haml +7 -0
  63. data/app/views/photos/edit.html.haml +3 -0
  64. data/app/views/photos/index.html.haml +21 -0
  65. data/app/views/photos/new.html.haml +4 -0
  66. data/app/views/photos/show.html.haml +4 -0
  67. data/app/views/sbdev_core/index.html.haml +1 -0
  68. data/app/views/sbdev_core/show.html.haml +4 -0
  69. data/app/views/sbdev_core/show.js.haml +1 -0
  70. data/app/views/shared/_asset_show.html.haml +1 -0
  71. data/app/views/shared/_devise_links.haml +15 -0
  72. data/app/views/shared/_gallery.html.haml +14 -0
  73. data/app/views/shared/_prioritizable_fields.html.haml +5 -0
  74. data/app/views/texts/_form.html.haml +3 -0
  75. data/app/views/texts/_show.html.haml +6 -0
  76. data/app/views/texts/edit.html.haml +3 -0
  77. data/app/views/texts/new.html.haml +4 -0
  78. data/app/views/texts/show.html.haml +8 -0
  79. data/app/views/videos/_form.html.haml +7 -0
  80. data/app/views/videos/_show.html.haml +12 -0
  81. data/app/views/videos/edit.html.haml +3 -0
  82. data/app/views/videos/index.html.haml +11 -0
  83. data/app/views/videos/new.html.haml +4 -0
  84. data/app/views/videos/show.html.haml +9 -0
  85. data/app/views/videos/show.js.haml +4 -0
  86. data/config/initializers/client_side_validations.rb +14 -0
  87. data/config/initializers/custom_validators.rb +15 -0
  88. data/config/initializers/load_app_config.rb +2 -0
  89. data/config/initializers/simple_form.rb +93 -0
  90. data/config/locales/en.yml +4 -1
  91. data/db/migrate/20110811000613_create_indices.rb +3 -0
  92. data/db/seeds.rb +23 -57
  93. data/lib/generators/sbdevcore/install_generator.rb +0 -2
  94. data/lib/generators/sbdevcore/templates/application.scss +1 -0
  95. data/lib/generators/sbdevcore/templates/application/_404.html.haml +2 -0
  96. data/lib/generators/sbdevcore/templates/application/_footer.html.haml +2 -1
  97. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.haml +3 -0
  98. data/lib/generators/sbdevcore/templates/application/_nav.html.haml +1 -1
  99. data/lib/generators/sbdevcore/templates/config/initializers/mailer_setup.rb +2 -2
  100. data/lib/generators/sbdevcore/templates/config/initializers/simple_form.rb +93 -0
  101. data/lib/generators/sbdevcore/templates/new_contact.html.haml +4 -0
  102. data/lib/sbdevcore.rb +25 -2
  103. data/lib/sbdevcore/engine.rb +13 -34
  104. data/lib/sbdevcore/version.rb +1 -1
  105. data/lib/tasks/sbdevcore.rake +1 -1
  106. data/public/404.html +2 -2
  107. data/sbdevcore.gemspec +7 -2
  108. metadata +296 -156
  109. data/app/assets/stylesheets/_js_errors.scss +0 -26
  110. data/app/controllers/core_controller.rb +0 -5
  111. data/app/controllers/sbdevcore/application_controller_extensions.rb +0 -13
  112. data/app/controllers/statics_controller.rb +0 -6
  113. data/app/models/asset.rb +0 -27
  114. data/app/views/admins/confirmations/new.html.erb +0 -12
  115. data/app/views/admins/mailer/confirmation_instructions.html.erb +0 -5
  116. data/app/views/admins/mailer/reset_password_instructions.html.erb +0 -8
  117. data/app/views/admins/mailer/unlock_instructions.html.erb +0 -7
  118. data/app/views/admins/passwords/edit.html.erb +0 -16
  119. data/app/views/admins/passwords/new.html.erb +0 -12
  120. data/app/views/admins/registrations/edit.html.erb +0 -25
  121. data/app/views/admins/registrations/new.html.erb +0 -18
  122. data/app/views/admins/sessions/new.html.erb +0 -17
  123. data/app/views/admins/unlocks/new.html.erb +0 -12
  124. data/app/views/contacts/_form.html.erb +0 -18
  125. data/app/views/contacts/edit.html.erb +0 -8
  126. data/app/views/contacts/index.html.erb +0 -27
  127. data/app/views/contacts/new.html.erb +0 -4
  128. data/app/views/contacts/show.html.erb +0 -32
  129. data/app/views/downloadables/_form.html.erb +0 -17
  130. data/app/views/downloadables/_show.html.erb +0 -8
  131. data/app/views/downloadables/edit.html.erb +0 -4
  132. data/app/views/downloadables/new.html.erb +0 -6
  133. data/app/views/galleries/_form.html.erb +0 -33
  134. data/app/views/galleries/edit.html.erb +0 -13
  135. data/app/views/galleries/index.html.erb +0 -16
  136. data/app/views/galleries/new.html.erb +0 -8
  137. data/app/views/galleries/show.html.erb +0 -17
  138. data/app/views/indices/_form.html.erb +0 -60
  139. data/app/views/indices/_show.html.erb +0 -22
  140. data/app/views/indices/edit.html.erb +0 -12
  141. data/app/views/indices/index.html.erb +0 -23
  142. data/app/views/indices/new.html.erb +0 -8
  143. data/app/views/indices/show.html.erb +0 -4
  144. data/app/views/indices/show.js.erb +0 -1
  145. data/app/views/photos/_form.html.erb +0 -27
  146. data/app/views/photos/_show.html.erb +0 -14
  147. data/app/views/photos/edit.html.erb +0 -4
  148. data/app/views/photos/index.html.erb +0 -27
  149. data/app/views/photos/new.html.erb +0 -6
  150. data/app/views/photos/overlay.html.erb +0 -1
  151. data/app/views/photos/show.html.erb +0 -5
  152. data/app/views/shared/_asset_show.html.erb +0 -1
  153. data/app/views/shared/_gallery.html.erb +0 -21
  154. data/app/views/shared/_prioritizable_fields.html.erb +0 -10
  155. data/app/views/shared/course_type_index.html.erb +0 -16
  156. data/app/views/texts/_form.html.erb +0 -9
  157. data/app/views/texts/_new.html.erb +0 -6
  158. data/app/views/texts/_show.html.erb +0 -9
  159. data/app/views/texts/edit.html.erb +0 -4
  160. data/app/views/texts/new.html.erb +0 -6
  161. data/app/views/texts/show.html.erb +0 -9
  162. data/app/views/videos/_form.html.erb +0 -17
  163. data/app/views/videos/_show.html.erb +0 -16
  164. data/app/views/videos/edit.html.erb +0 -4
  165. data/app/views/videos/index.html.erb +0 -17
  166. data/app/views/videos/new.html.erb +0 -6
  167. data/app/views/videos/show.html.erb +0 -12
  168. data/lib/generators/sbdevcore/templates/application/_404.html.erb +0 -2
  169. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.erb +0 -7
  170. data/lib/generators/sbdevcore/templates/config/tiny_mce.yml +0 -46
  171. data/lib/generators/sbdevcore/templates/new_contact.html.erb +0 -4
  172. data/vendor/assets/stylesheets/.gitkeep +0 -0
  173. data/vendor/plugins/.gitkeep +0 -0
@@ -2,20 +2,18 @@
2
2
 
3
3
  /* must be initially hidden */
4
4
  display:none;
5
-
6
5
  /* place overlay on top of other elements */
7
6
  z-index:10000;
8
-
7
+ position: absolute;
9
8
  /* styling */
10
9
  background-color: $content-background-color;
11
10
 
12
- width:840px;
11
+ width: $content-width - 100px;
13
12
  padding: 20px;
14
13
  min-height:200px;
15
14
  top: 0 !important;
16
- /*overflow-y: auto; */
17
- /* CSS3 styling for latest browsers */
18
- @include box-shadow(90px);
15
+ @include box-shadow(50px);
16
+ @include corners-all(10px);
19
17
  }
20
18
 
21
19
  /* close button positioned on upper right corner */
@@ -31,5 +29,4 @@
31
29
 
32
30
  .overlay img {
33
31
  max-width: 800px;
34
- max-height: 600px;
35
32
  }
@@ -1,36 +1,62 @@
1
+ @import 'yui_base';
1
2
  @import 'mixins';
2
3
  @import 'gallery';
3
4
  @import 'buttons';
4
5
  @import 'tooltips';
5
- @import 'js_errors';
6
6
  @import 'trip_advisor';
7
7
  @import 'overlay';
8
8
  @import 'testimonials';
9
+ @import 'forms';
10
+ @import 'bar_nav';
9
11
 
10
12
  /*layout*/
13
+ @font-face {
14
+ font-family: "28Days";
15
+ src: url("28DaysLater.ttf") format("truetype");
16
+ }
17
+
11
18
  body {
12
- font-family: "Lucida Grande","Lucida Sans Unicode","bitstream vera sans","trebuchet ms",verdana,sans-serif;
13
- font-size: 16px;
14
- padding: 0;
15
- margin: 0;
19
+ background-color: $button-background-color;
20
+ font: 14px/1.5 Georgia,arial,helvetica,clean,sans-serif;
16
21
  }
17
22
 
18
23
  #container {
19
24
  width: $window-width;
20
25
  margin: 0 auto;
21
- overflow: hidden;
22
26
  }
23
27
 
24
28
  #header {
25
- background-color: transparent;
26
- padding: $padding;
27
- width: $content-width;
28
- text-align: center;
29
- h1 {
30
- margin: 0;
29
+ background-color: $content-background-color;
30
+ height: 120px;
31
+ border-bottom: 2px solid silver;
32
+ .inner {
33
+ width: $content-width;
34
+ margin: 0 auto;
35
+ position: relative;
36
+ h1 {
37
+ margin: 10px 0;
38
+ font-size: 300%;
39
+ letter-spacing: 3px;
40
+ word-spacing: 7px;
41
+ font-family: "28Days";
42
+ text-shadow: 4px 4px 3px steelblue;
43
+ display: inline-block;
44
+ font-weight: normal;
45
+ }
31
46
  }
32
47
  }
33
48
 
49
+ #main {
50
+ width: 75%;
51
+ float: left;
52
+ }
53
+
54
+ #side_bar {
55
+ width: 24%;
56
+ float: left;
57
+ border-left: 1px dashed silver;
58
+ }
59
+
34
60
  .content {
35
61
  background-color: $content-background-color;
36
62
  padding: $padding;
@@ -132,17 +158,25 @@ form {
132
158
  }
133
159
 
134
160
  /*Flash*/
135
- #flash_notice, #flash_error {
161
+ .asset {
162
+ padding: 5px;
163
+ }
164
+
165
+ .highlight-section {
166
+ padding: 4px;
167
+ }
168
+
169
+ #flash_notice, #flash_error, .error {
136
170
  padding: 5px 8px;
137
171
  margin: 10px 0;
138
172
  }
139
173
 
140
- #flash_notice {
174
+ #flash_notice, .highlight-section, .error {
141
175
  background-color: #CFC;
142
176
  border: solid 1px #6C6;
143
177
  }
144
178
 
145
- #flash_error {
179
+ #flash_error, .error {
146
180
  background-color: #FCC;
147
181
  border: solid 1px #C66;
148
182
  }
@@ -166,10 +200,6 @@ table.mceLayout {
166
200
  text-align: center;
167
201
  }
168
202
 
169
- .highlight-section {
170
- background-color: #FFE87C;
171
- }
172
-
173
203
  .justify_right {
174
204
  text-align: right;
175
205
  }
@@ -194,3 +224,9 @@ td {
194
224
  float: right;
195
225
  }
196
226
 
227
+ .ajax-loader {
228
+ background: url('/assets/ajax-loader.gif') center center no-repeat;
229
+ * {
230
+ opacity: .5;
231
+ }
232
+ }
@@ -0,0 +1,142 @@
1
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
2
+ margin: 0;
3
+ padding: 0; }
4
+
5
+ table {
6
+ border-collapse: collapse;
7
+ border-spacing: 0; }
8
+
9
+ fieldset, img {
10
+ border: 0; }
11
+
12
+ address, caption, cite, code, dfn, em, strong, th, var {
13
+ font-style: normal;
14
+ font-weight: normal; }
15
+
16
+ li {
17
+ list-style: none; }
18
+
19
+ caption, th {
20
+ text-align: left; }
21
+
22
+ h1, h2, h3, h4, h5, h6 {
23
+ font-size: 100%;
24
+ font-weight: normal; }
25
+
26
+ q {
27
+ &:before, &:after {
28
+ content: ''; } }
29
+
30
+ abbr, acronym {
31
+ border: 0;
32
+ font-variant: normal; }
33
+
34
+ /* to preserve line-height and selector appearance */
35
+
36
+ sup {
37
+ vertical-align: text-top; }
38
+
39
+ sub {
40
+ vertical-align: text-bottom; }
41
+
42
+ input, textarea, select {
43
+ font-family: inherit;
44
+ font-size: inherit;
45
+ font-weight: inherit; }
46
+
47
+ /*to enable resizing for IE*/
48
+
49
+ input, textarea, select {
50
+ *font-size: 100%; }
51
+
52
+ /*because legend doesn't inherit in IE */
53
+
54
+ legend {
55
+ color: #000; }
56
+
57
+ body {
58
+ font: 13px / 1.231 arial, helvetica, clean, sans-serif;
59
+ *font-size: small;
60
+ /* for IE */
61
+ *font: x-small;
62
+ /* for IE in quirks mode */ }
63
+
64
+ select, input, button, textarea {
65
+ font: 99% arial,helvetica,clean,sans-serif; }
66
+
67
+ table {
68
+ font-size: inherit;
69
+ font: 100%; }
70
+ pre, code, kbd, samp, tt {
71
+ font-family: monospace;
72
+ *font-size: 108%;
73
+ line-height: 100%; }
74
+
75
+ h1 {
76
+ /*18px via YUI Fonts CSS foundation*/
77
+ font-size: 138.5%; }
78
+
79
+ h2 {
80
+ /*16px via YUI Fonts CSS foundation*/
81
+ font-size: 123.1%; }
82
+
83
+ h3 {
84
+ /*14px via YUI Fonts CSS foundation*/
85
+ font-size: 108%; }
86
+
87
+ h1, h2, h3 {
88
+ /* top & bottom margin based on font size */
89
+ margin: 1em 0; }
90
+
91
+ h1, h2, h3, h4, h5, h6, strong {
92
+ /*bringing boldness back to headers and the strong element*/
93
+ font-weight: bold; }
94
+
95
+ abbr, acronym {
96
+ /*indicating to users that more info is available */
97
+ border-bottom: 1px dotted #000;
98
+ cursor: help; }
99
+
100
+ em {
101
+ /*bringing italics back to the em element*/
102
+ font-style: italic; }
103
+
104
+ blockquote, ul, ol, dl {
105
+ /*giving blockquotes and lists room to breath*/
106
+ margin: 1em; }
107
+
108
+ ol, ul, dl {
109
+ /*bringing lists on to the page with breathing room */
110
+ margin-left: 2em; }
111
+
112
+ ol li {
113
+ /*giving OL's LIs generated numbers*/
114
+ list-style: decimal outside; }
115
+
116
+ ul li {
117
+ /*giving UL's LIs generated disc markers*/
118
+ list-style: disc outside; }
119
+
120
+ dl dd {
121
+ /*providing spacing for definition terms*/
122
+ margin-left: 1em; }
123
+
124
+ th, td {
125
+ /*borders and padding to make the table readable*/
126
+ border: 1px solid #000;
127
+ padding: .5em; }
128
+
129
+ th {
130
+ /*distinguishing table headers from data cells*/
131
+ font-weight: bold;
132
+ text-align: center; }
133
+
134
+ caption {
135
+ /*coordinated margin to match cell's padding*/
136
+ margin-bottom: .5em;
137
+ /*centered so it doesn't blend in to other content*/
138
+ text-align: center; }
139
+
140
+ p, fieldset, table, pre {
141
+ /*so things don't run into each other*/
142
+ margin-bottom: 1em; }
@@ -1,38 +1,4 @@
1
- class ContactsController < ApplicationController
2
- before_filter :get_index, :only => [:new]
1
+ class ContactsController < SbdevCoreController
3
2
  before_filter :authenticate_admin!, :except => [:new, :create]
4
-
5
- def index
6
- @contacts = Contact.all
7
- end
8
-
9
- def show
10
- @contact = Contact.find(params[:id])
11
- end
12
-
13
- def new
14
- @contact = Contact.new
15
- render :layout => false
16
- end
17
-
18
- def create
19
- @contact = Contact.new(params[:contact])
20
- if @contact.save
21
- flash[:notice] = "Your message has been sent."
22
- redirect_to root_url
23
- else
24
- render :action => 'new'
25
- end
26
- end
27
-
28
- def destroy
29
- @contact = Contact.find(params[:id])
30
- @contact.destroy
31
- flash[:notice] = "Successfully destroyed contact."
32
- redirect_to contacts_url
33
- end
34
-
35
- def get_index
36
- Index.find_by_name(controller_name)
37
- end
3
+ before_filter :get_index, :only => :new
38
4
  end
@@ -1,51 +1,11 @@
1
- class DownloadablesController < ApplicationController
2
- before_filter :authenticate_admin!, :except => [:show]
3
- OpenURI::Buffer::StringMax = 1000
1
+ class DownloadablesController < SbdevCoreController
2
+ before_filter :authenticate_admin!, :except => :show
3
+ skip_before_filter :get_index
4
+ belongs_to :index, :optional => true
4
5
 
5
- def index
6
- @downloadables = Downloadable.all
7
- end
8
-
9
6
  def show
10
- @downloadable = Downloadable.find(params[:id])
11
- send_data(@downloadable.asset.url, :filename => @downloadable.asset_file_name, :type => @downloadable.asset_content_type, :disposition => 'attachment')
12
- end
13
-
14
- def new
15
- @index = Index.find(params[:index_id])
16
- @downloadable = @index.downloadables.build(:priority => ((@index.assets.first.lowest_priority + 1) rescue 0))
17
- render :layout => false
18
- end
19
-
20
- def create
21
- @downloadable = Downloadable.new(params[:downloadable])
22
- if @downloadable.save
23
- flash[:notice] = "Successfully created downloadable."
24
- redirect_to :back
25
- else
26
- render :action => 'new'
7
+ show! do |format|
8
+ format.html {send_data(@downloadable.asset.url, :filename => @downloadable.asset_file_name, :type => @downloadable.asset_content_type, :disposition => 'attachment')}
27
9
  end
28
10
  end
29
-
30
- def edit
31
- @downloadable = Downloadable.find(params[:id])
32
- render :layout => false
33
- end
34
-
35
- def update
36
- @downloadable = Downloadable.find(params[:id])
37
- if @downloadable.update_attributes(params[:downloadable])
38
- flash[:notice] = "Successfully updated downloadable."
39
- redirect_to :back
40
- else
41
- render :action => 'edit'
42
- end
43
- end
44
-
45
- def destroy
46
- @downloadable = Downloadable.find(params[:id])
47
- @downloadable.destroy
48
- flash[:notice] = "Successfully destroyed downloadable."
49
- redirect_to :back
50
- end
51
11
  end
@@ -1,50 +1,5 @@
1
- class GalleriesController < ApplicationController
2
- before_filter :authenticate_admin!, :except => [:index, :show]
3
- before_filter :get_index, :only => [:index]
4
-
5
- def index
6
- @galleries = Gallery.all
7
- end
8
-
9
- def show
10
- @gallery = Gallery.find(params[:id])
11
- @index = @gallery.index
12
- @photo = @gallery.photos.first
13
- end
14
-
15
- def new
16
- @gallery = Gallery.new
17
- @gallery.build_index
18
- end
19
-
20
- def create
21
- @gallery = Gallery.new(params[:gallery])
22
- if @gallery.save
23
- flash[:notice] = "Successfully created gallery."
24
- redirect_to @gallery
25
- else
26
- render :action => 'new'
27
- end
28
- end
29
-
30
- def edit
31
- @gallery = Gallery.find(params[:id])
32
- end
33
-
34
- def update
35
- @gallery = Gallery.find(params[:id])
36
- if @gallery.update_attributes(params[:gallery])
37
- flash[:notice] = "Successfully updated gallery."
38
- redirect_to @gallery
39
- else
40
- render :action => 'edit'
41
- end
42
- end
43
-
44
- def destroy
45
- @gallery = Gallery.find(params[:id])
46
- @gallery.destroy
47
- flash[:notice] = "Successfully destroyed gallery."
48
- redirect_to galleries_url
49
- end
1
+ class GalleriesController < SbdevCoreController
2
+ before_filter :authenticate_admin!
3
+ skip_before_filter :get_index
4
+ belongs_to :index, :optional => true
50
5
  end