Permalink
Browse files

Install ActiveAdmin

  • Loading branch information...
1 parent 8a1c1e2 commit 8c1cfbf32bef96fa9021e2d4bf4aa7a3c5cac6c2 @jenimech committed Dec 30, 2011
View
@@ -3,11 +3,13 @@ source 'http://rubygems.org'
gem 'rails', '3.1.1'
gem 'pg'
+gem 'activeadmin'
+gem 'sass-rails'
+gem "meta_search", '>= 1.1.0.pre'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
View
@@ -15,6 +15,15 @@ GEM
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
+ activeadmin (0.3.4)
+ devise (>= 1.1.2)
+ fastercsv
+ formtastic (< 2.0.0)
+ inherited_resources (< 1.3.0)
+ kaminari (>= 0.12.4)
+ meta_search (>= 0.9.2)
+ rails (>= 3.0.0)
+ sass (>= 3.1.0)
activemodel (3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
@@ -31,6 +40,7 @@ GEM
multi_json (~> 1.0)
ansi (1.4.1)
arel (2.2.1)
+ bcrypt-ruby (3.0.1)
builder (3.0.0)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
@@ -39,21 +49,48 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.3)
+ devise (1.5.3)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.1)
erubis (2.7.0)
execjs (1.2.12)
multi_json (~> 1.0)
+ fastercsv (1.5.4)
+ formtastic (1.2.4)
+ actionpack (>= 2.3.7)
+ activesupport (>= 2.3.7)
+ i18n (~> 0.4)
+ has_scope (0.5.1)
hike (1.2.1)
i18n (0.6.0)
+ inherited_resources (1.2.2)
+ has_scope (~> 0.5.0)
+ responders (~> 0.6.0)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.3)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ meta_search (1.1.1)
+ actionpack (~> 3.1.0)
+ activerecord (~> 3.1.0)
+ activesupport (~> 3.1.0)
+ polyamorous (~> 0.5.0)
mime-types (1.17.2)
multi_json (1.0.4)
+ orm_adapter (0.0.5)
+ pg (0.12.0)
+ rake-compiler (~> 0.7)
+ polyamorous (0.5.0)
+ activerecord (~> 3.0)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
@@ -80,8 +117,11 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
+ rake-compiler (0.7.9)
+ rake
rdoc (3.12)
json (~> 1.4)
+ responders (0.6.4)
sass (3.1.11)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
@@ -92,7 +132,6 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
@@ -104,15 +143,19 @@ GEM
uglifier (1.2.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
+ warden (1.1.0)
+ rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
+ activeadmin
coffee-rails (~> 3.1.1)
jquery-rails
+ meta_search (>= 1.1.0.pre)
+ pg
rails (= 3.1.1)
- sass-rails (~> 3.1.4)
- sqlite3
+ sass-rails
turn
uglifier (>= 1.0.3)
@@ -0,0 +1 @@
+//= require active_admin/base
@@ -0,0 +1,6 @@
+// Active Admin CSS Styles
+@import "active_admin/mixins";
+@import "active_admin/base";
+
+// To customize the Active Admin interfaces, add your
+// styles here:
View
@@ -0,0 +1,9 @@
+class AdminUser < ActiveRecord::Base
+ # Include default devise modules. Others available are:
+ # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
+ devise :database_authenticatable,
+ :recoverable, :rememberable, :trackable, :validatable
+
+ # Setup accessible (or protected) attributes for your model
+ attr_accessible :email, :password, :password_confirmation, :remember_me
+end
@@ -7,7 +7,8 @@
<%= csrf_meta_tags %>
</head>
<body>
-
+ <p class="notice"><%= notice %></p>
+ <p class="alert"><%= alert %></p>
<%= yield %>
</body>
View
@@ -41,6 +41,7 @@ class Application < Rails::Application
# Enable the asset pipeline
config.assets.enabled = true
+ config.assets.initialize_on_precompile = false
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
@@ -1,4 +1,5 @@
SysTurns::Application.configure do
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
@@ -0,0 +1,103 @@
+ActiveAdmin.setup do |config|
+
+ # == Site Title
+ #
+ # Set the title that is displayed on the main layout
+ # for each of the active admin pages.
+ #
+ config.site_title = "Sys Turns"
+
+ # Set the link url for the title. For example, to take
+ # users to your main site. Defaults to no link.
+ #
+ # config.site_title_link = "/"
+
+ # == Default Namespace
+ #
+ # Set the default namespace each administration resource
+ # will be added to.
+ #
+ # eg:
+ # config.default_namespace = :hello_world
+ #
+ # This will create resources in the HelloWorld module and
+ # will namespace routes to /hello_world/*
+ #
+ # To set no namespace by default, use:
+ # config.default_namespace = false
+ #
+ # Default:
+ # config.default_namespace = :admin
+
+ # == User Authentication
+ #
+ # Active Admin will automatically call an authentication
+ # method in a before filter of all controller actions to
+ # ensure that there is a currently logged in admin user.
+ #
+ # This setting changes the method which Active Admin calls
+ # within the controller.
+ config.authentication_method = :authenticate_admin_user!
+
+
+ # == Current User
+ #
+ # Active Admin will associate actions with the current
+ # user performing them.
+ #
+ # This setting changes the method which Active Admin calls
+ # to return the currently logged in user.
+ config.current_user_method = :current_admin_user
+
+
+ # == Logging Out
+ #
+ # Active Admin displays a logout link on each screen. These
+ # settings configure the location and method used for the link.
+ #
+ # This setting changes the path where the link points to. If it's
+ # a string, the strings is used as the path. If it's a Symbol, we
+ # will call the method to return the path.
+ #
+ # Default:
+ # config.logout_link_path = :destroy_admin_user_session_path
+
+ # This setting changes the http method used when rendering the
+ # link. For example :get, :delete, :put, etc..
+ #
+ # Default:
+ # config.logout_link_method = :get
+
+
+ # == Admin Comments
+ #
+ # Admin comments allow you to add comments to any model for admin use
+ #
+ # Admin comments are enabled by default in the default
+ # namespace only. You can turn them on in a namesapce
+ # by adding them to the comments array.
+ #
+ # Default:
+ # config.allow_comments_in = [:admin]
+
+
+ # == Controller Filters
+ #
+ # You can add before, after and around filters to all of your
+ # Active Admin resources from here.
+ #
+ # config.before_filter :do_something_awesome
+
+
+ # == Register Stylesheets & Javascripts
+ #
+ # We recommend using the built in Active Admin layout and loading
+ # up your own stylesheets / javascripts to customize the look
+ # and feel.
+ #
+ # To load a stylesheet:
+ # config.register_stylesheet 'my_stylesheet.css'
+ #
+ # To load a javascript file:
+ # config.register_javascript 'my_javascript.js'
+end
Oops, something went wrong.

0 comments on commit 8c1cfbf

Please sign in to comment.