Packages controller added
This commit is contained in:
parent
f28c637d10
commit
c2a695aec0
15 changed files with 110 additions and 1 deletions
3
app/assets/javascripts/packages.js.coffee
Normal file
3
app/assets/javascripts/packages.js.coffee
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
3
app/assets/stylesheets/packages.css.scss
Normal file
3
app/assets/stylesheets/packages.css.scss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// Place all the styles related to the packages controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
14
app/controllers/packages_controller.rb
Normal file
14
app/controllers/packages_controller.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class PackagesController < ApplicationController
|
||||
def index
|
||||
@packages = Package.order('name').first(20)
|
||||
end
|
||||
|
||||
def with_screenshots
|
||||
end
|
||||
|
||||
def without_screenshots
|
||||
end
|
||||
|
||||
def moderate
|
||||
end
|
||||
end
|
||||
2
app/helpers/packages_helper.rb
Normal file
2
app/helpers/packages_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
module PackagesHelper
|
||||
end
|
||||
2
app/models/package.rb
Normal file
2
app/models/package.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class Package < ActiveRecord::Base
|
||||
end
|
||||
10
app/views/packages/index.html.erb
Normal file
10
app/views/packages/index.html.erb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<h1>Packages#index</h1>
|
||||
<p>Find me in app/views/packages/index.html.erb</p>
|
||||
|
||||
<ul>
|
||||
<% @packages.each do |package| %>
|
||||
<li>
|
||||
<%= package.name %> <i>(<%= package.description %>)</i>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
2
app/views/packages/moderate.html.erb
Normal file
2
app/views/packages/moderate.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Packages#moderate</h1>
|
||||
<p>Find me in app/views/packages/moderate.html.erb</p>
|
||||
2
app/views/packages/with_screenshots.html.erb
Normal file
2
app/views/packages/with_screenshots.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Packages#with_screenshots</h1>
|
||||
<p>Find me in app/views/packages/with_screenshots.html.erb</p>
|
||||
2
app/views/packages/without_screenshots.html.erb
Normal file
2
app/views/packages/without_screenshots.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Packages#without_screenshots</h1>
|
||||
<p>Find me in app/views/packages/without_screenshots.html.erb</p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue