From 89fe2a01eb57f0ffe255525a88bc0973483e39fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=B1or=20Rolando?= Date: Sun, 8 Dec 2013 22:15:14 +0100 Subject: [PATCH] Stub out the reposts controller that will manage the flow of logic. --- app/assets/javascripts/reposts.js.coffee | 3 ++ app/assets/stylesheets/reposts.css.scss | 3 ++ app/controllers/reposts_controller.rb | 4 ++ app/helpers/reposts_helper.rb | 2 + app/views/reposts/index.html.erb | 7 +++ config/routes.rb | 55 +-------------------- test/controllers/reposts_controller_test.rb | 7 +++ test/helpers/reposts_helper_test.rb | 4 ++ 8 files changed, 31 insertions(+), 54 deletions(-) create mode 100644 app/assets/javascripts/reposts.js.coffee create mode 100644 app/assets/stylesheets/reposts.css.scss create mode 100644 app/controllers/reposts_controller.rb create mode 100644 app/helpers/reposts_helper.rb create mode 100644 app/views/reposts/index.html.erb create mode 100644 test/controllers/reposts_controller_test.rb create mode 100644 test/helpers/reposts_helper_test.rb diff --git a/app/assets/javascripts/reposts.js.coffee b/app/assets/javascripts/reposts.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/reposts.js.coffee @@ -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/ diff --git a/app/assets/stylesheets/reposts.css.scss b/app/assets/stylesheets/reposts.css.scss new file mode 100644 index 0000000..4b98949 --- /dev/null +++ b/app/assets/stylesheets/reposts.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Reposts controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/reposts_controller.rb b/app/controllers/reposts_controller.rb new file mode 100644 index 0000000..228f00e --- /dev/null +++ b/app/controllers/reposts_controller.rb @@ -0,0 +1,4 @@ +class RepostsController < ApplicationController + def index + end +end diff --git a/app/helpers/reposts_helper.rb b/app/helpers/reposts_helper.rb new file mode 100644 index 0000000..a6a0b2a --- /dev/null +++ b/app/helpers/reposts_helper.rb @@ -0,0 +1,2 @@ +module RepostsHelper +end diff --git a/app/views/reposts/index.html.erb b/app/views/reposts/index.html.erb new file mode 100644 index 0000000..d6e0e47 --- /dev/null +++ b/app/views/reposts/index.html.erb @@ -0,0 +1,7 @@ +

+ This is the helping hand behind the reposts of the @Karlsruher on App.net. +

+ +

+ There is nothing much to see here directly, though. +

diff --git a/config/routes.rb b/config/routes.rb index 9276e7f..f9d57be 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,56 +1,3 @@ AdnRepostmentions::Application.routes.draw do - # The priority is based upon order of creation: first created -> highest priority. - # See how all your routes lay out with "rake routes". - - # You can have the root of your site routed with "root" - # root 'welcome#index' - - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end + root :to => 'reposts#index' end diff --git a/test/controllers/reposts_controller_test.rb b/test/controllers/reposts_controller_test.rb new file mode 100644 index 0000000..baa09a4 --- /dev/null +++ b/test/controllers/reposts_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class RepostsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/helpers/reposts_helper_test.rb b/test/helpers/reposts_helper_test.rb new file mode 100644 index 0000000..b5007ed --- /dev/null +++ b/test/helpers/reposts_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class RepostsHelperTest < ActionView::TestCase +end