Skip to content
Browse files

adding a bit more nonsense before deciding to manage this stuff with …

…activeadmin
  • Loading branch information...
1 parent da2543b commit 375282d019580408a265e6559647be958d3cab3e @nikolaiwarner nikolaiwarner committed Jul 9, 2012
View
1 .gitignore
@@ -1,3 +1,4 @@
+.DS_Store
*.rbc
*.sassc
.sass-cache
View
3 Gemfile
@@ -16,6 +16,9 @@ end
gem 'simple_form'
gem 'devise'
+gem 'activeadmin'
+gem 'meta_search', '>= 1.1.0.pre'
+
# Gems used only for assets and not required
# in production environments by default.
group :assets do
View
3 app/assets/javascripts/items.js.coffee
@@ -1,3 +0,0 @@
-# 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://jashkenas.github.com/coffee-script/
View
3 app/assets/javascripts/pages.js.coffee
@@ -1,3 +0,0 @@
-# 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://jashkenas.github.com/coffee-script/
View
3 app/assets/stylesheets/items.css.scss
@@ -1,3 +0,0 @@
-// Place all the styles related to the Items controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
View
3 app/assets/stylesheets/pages.css.scss
@@ -1,3 +0,0 @@
-// Place all the styles related to the Pages controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
View
72 app/controllers/member_types_controller.rb
@@ -0,0 +1,72 @@
+class MemberTypesController < ApplicationController
+
+ def index
+ @member_types = MemberType.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @member_types }
+ end
+ end
+
+ def show
+ @member_type = MemberType.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @member_type }
+ end
+ end
+
+ def new
+ @member_type = MemberType.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @member_type }
+ end
+ end
+
+ def edit
+ @member_type = MemberType.find(params[:id])
+ end
+
+ def create
+ @member_type = MemberType.new(params[:member_type])
+
+ respond_to do |format|
+ if @member_type.save
+ format.html { redirect_to @member_type, notice: 'member_type was successfully created.' }
+ format.json { render json: @member_type, status: :created, location: @member_type }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @member_type.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ def update
+ @member_type = MemberType.find(params[:id])
+
+ respond_to do |format|
+ if @member_type.update_attributes(params[:member_type])
+ format.html { redirect_to @member_type, notice: 'member_type was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @member_type.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ def destroy
+ @member_type = MemberType.find(params[:id])
+ @member_type.destroy
+
+ respond_to do |format|
+ format.html { redirect_to member_types_url }
+ format.json { head :no_content }
+ end
+ end
+
+end
View
34 app/controllers/users_controller.rb
@@ -0,0 +1,34 @@
+class UsersController < ApplicationController
+
+ def index
+ @users = User.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @users }
+ end
+ end
+
+ def show
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @user }
+ end
+ end
+
+ def new
+ @user = User.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @user }
+ end
+ end
+
+ def edit
+ @user = User.find(params[:id])
+ end
+
+end
View
2 app/helpers/member_types_helper.rb
@@ -0,0 +1,2 @@
+module MemberTypesHelper
+end
View
2 app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
+module UsersHelper
+end
View
3 app/models/member_type.rb
@@ -0,0 +1,3 @@
+class MemberType < ActiveRecord::Base
+
+end
View
7 test/functional/member_types_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class MemberTypesControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
7 test/functional/users_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UsersControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
4 test/unit/helpers/member_types_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class MemberTypesHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/users_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class UsersHelperTest < ActionView::TestCase
+end

0 comments on commit 375282d

Please sign in to comment.
Something went wrong with that request. Please try again.