Skip to content

Commit

Permalink
rails_apps_composer: add README files
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKehoe committed Feb 24, 2014
1 parent 11c1628 commit f92d6cc
Show file tree
Hide file tree
Showing 11 changed files with 262 additions and 88 deletions.
62 changes: 58 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
RECIPES
["apps4", "controllers", "core", "email", "extras", "frontend", "gems", "git", "init", "models", "prelaunch", "railsapps", "readme", "routes", "saas", "setup", "testing", "views"]
PREFERENCES
{:git=>true, :apps4=>"rails-devise", :unit_test=>false, :integration=>false, :fixtures=>false, :authentication=>"devise", :authorization=>false, :starter_app=>false, :quiet_assets=>true, :local_env_file=>false, :better_errors=>true, :dev_webserver=>"webrick", :prod_webserver=>"same", :database=>"sqlite", :templates=>"erb", :continuous_testing=>"none", :frontend=>"simple", :email=>"gmail", :devise_modules=>"default", :form_builder=>"none"}
Rails Devise
========================

This application was generated with the rails_apps_composer gem:
https://github.com/RailsApps/rails_apps_composer
provided by the RailsApps Project:
http://railsapps.github.io/

________________________

Recipes:

* apps4
* controllers
* core
* email
* extras
* frontend
* gems
* git
* init
* models
* prelaunch
* railsapps
* readme
* routes
* saas
* setup
* testing
* views

Preferences:

* git: true
* apps4: rails-devise
* unit_test: false
* integration: false
* fixtures: false
* authentication: devise
* authorization: false
* starter_app: false
* quiet_assets: true
* local_env_file: false
* better_errors: true
* dev_webserver: webrick
* prod_webserver: same
* database: sqlite
* templates: erb
* continuous_testing: none
* frontend: simple
* email: gmail
* devise_modules: default
* form_builder: none
* rvmrc: true

________________________

License
140 changes: 140 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
Rails Devise
=========

This application was generated with the [rails_apps_composer](https://github.com/RailsApps/rails_apps_composer) gem
provided by the [RailsApps Project](http://railsapps.github.io/).

Diagnostics
-----------

This application was built with recipes that are known to work together.

This application was built with preferences that are NOT known to work
together.

If the application doesn’t work as expected, please [report an issue](https://github.com/RailsApps/rails_apps_composer/issues)
and include these diagnostics:

We’d also like to know if you’ve found combinations of recipes or
preferences that do work together.

Recipes:

* apps4
* controllers
* core
* email
* extras
* frontend
* gems
* git
* init
* models
* prelaunch
* railsapps
* readme
* routes
* saas
* setup
* testing
* views

Preferences:

* git: true
* apps4: rails-devise
* unit_test: false
* integration: false
* fixtures: false
* authentication: devise
* authorization: false
* starter_app: false
* quiet_assets: true
* local_env_file: false
* better_errors: true
* dev_webserver: webrick
* prod_webserver: same
* database: sqlite
* templates: erb
* continuous_testing: none
* frontend: simple
* email: gmail
* devise_modules: default
* form_builder: none
* rvmrc: true

Ruby on Rails
-------------

This application requires:

- Ruby
- Rails

Learn more about [Installing Rails](http://railsapps.github.io/installing-rails.html).

Database
--------

This application uses SQLite with ActiveRecord.

Development
-----------

- Template Engine: ERB
- Testing Framework: Test::Unit
- Front-end Framework: None
- Form Builder: None
- Authentication: Devise
- Authorization: None
- Admin: None

Email
-----

The application is configured to send email using a Gmail account.

Email delivery is disabled in development.

Getting Started
---------------

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Documentation and Support
-------------------------

This is the only documentation.

#### Issues

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Similar Projects
----------------

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Contributing
------------

If you make improvements to this application, please share with others.

- Fork the project on GitHub.
- Make your feature addition or bug fix.
- Commit with Git.
- Send the author a pull request.

If you add functionality to this application, create an alternative
implementation, or build an application that is similar, please contact
me and I’ll add a note to the README so that others can find your work.

Credits
-------

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

License
-------

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
28 changes: 0 additions & 28 deletions README.rdoc

This file was deleted.

5 changes: 5 additions & 0 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class HomeController < ApplicationController
def index
@users = User.all
end
end
9 changes: 9 additions & 0 deletions app/controllers/registrations_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class RegistrationsController < Devise::RegistrationsController
before_filter :update_sanitized_params, if: :devise_controller?

def update_sanitized_params
devise_parameter_sanitizer.for(:sign_up) {|u| u.permit(:email, :password, :password_confirmation)}
devise_parameter_sanitizer.for(:account_update) {|u| u.permit(:email, :password, :password_confirmation, :current_password)}
end

end
12 changes: 12 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class UsersController < ApplicationController
before_filter :authenticate_user!

def index
@users = User.all
end

def show
@user = User.find(params[:id])
end

end
4 changes: 4 additions & 0 deletions app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h3>Home</h3>
<% @users.each do |user| %>
<p>User: <%=link_to user.email, user %></p>
<% end %>
8 changes: 8 additions & 0 deletions app/views/users/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h3>Users</h3>
<ul class="users">
<% @users.each do |user| %>
<li>
<%= link_to user.email, user %> signed up <%= user.created_at.to_date %>
</li>
<% end %>
</ul>
2 changes: 2 additions & 0 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h3>User</h3>
<p>Email: <%= @user.email if @user.email %></p>
60 changes: 4 additions & 56 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,57 +1,5 @@
RailsDevise::Application.routes.draw do
devise_for :users
# 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
end
root :to => "home#index"
devise_for :users, :controllers => {:registrations => "registrations"}
resources :users
end
20 changes: 20 additions & 0 deletions public/humans.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* the humans responsible & colophon */
/* humanstxt.org */


/* TEAM */
<your title>: <your name>
Site:
Twitter:
Location:

/* THANKS */
Daniel Kehoe (@rails_apps) for the RailsApps project

/* SITE */
Standards: HTML5, CSS3
Components: jQuery
Software: Ruby on Rails

/* GENERATED BY */
RailsApps application template: http://railsapps.github.io/

0 comments on commit f92d6cc

Please sign in to comment.