Skip to content

Cortex_Engine is a rails (2.3.8) base setup that includes eveything you need to get started on a new ruby on rails project.

Notifications You must be signed in to change notification settings

XFinger/cortex_engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cortex_Engine

Cortex_Engine is a rails (2.3.8) base setup that includes eveything you need to get started on a new ruby on rails project.

Includes:

  • User authentication with AuthLogic
  • Forgot password plugin with password mailer
  • Contact us forms and mailers with support for gmail
  • Application layout (basic single column with header and footer)
  • CSS (very basic)
  • Support for jquery
  • A few useful javascripts for fading flash notice/errors and form field hinting
  • A sessions table for using active_record_store
  • Acts as state machine gem
  • Form style helper

Install

  1. Grab the git repo
  2. Edit /config/database.yml
  3. Create the databases – rake db:create:all
  4. Load the schema – rake db:schema:load
  5. Edit /config/initializers/session_store.rb
  6. Edit /config/mailer.yml
  7. Edit /config/initializers/smtp_gmail.rb
  8. Edit /models/user_mailer.rb
  9. Edit /models/password_mailer.rb
  10. Install gems – rake gems:install
  11. Fire up your server and see what you’ve done!

More Information

Database:

The database.yml is set up to use MySQL for your database, you can change it to use SQLite or another DB of your preference.

Sessions:

Sessions are stored in the DB. There is a sessions table set up for storage. Using the database for sessions is more secure and efficent.
Change the key and secret in /config/initializers/session_store.rb. If you prefer to use the default cookie based approach, you can comment out or delete line 24 “config.action_controller.session_store = :active_record_store” in /config/environment.rb and delete the sessions table from the database.
Please note that the sessions table can grow quite large and should be purged on a regular basis. Use rake db:sessions:clear. You may also want to set up a cron job to do this at a regular interval.

Mailers( password and contact_us)

The mailers are set up to use gmail for smtp. You need to edit 4 files ( mailer.yml, smtp_gmail.rb, user_mailer.rb & password_mailer.rb), adding your email address and passwords as necessary. If you don’t want to use gmail, you can delete smtp_gmail.rb.

Gems:

  • Binarylogic Authlogic gem for user authentication. More configuration information and modules can be found on github
  • rubyist-aasm gem ( acts as state machine ). The aasm gem isn’t necessary for the cortex_engine but I always seem to find a need for it so I have included it. More info can be found on github

Plugins

  • Greenisus forgot_password_plugin for resetting forgotten passwords. More info can be found on github

Javascript

Cortex_Engine in configured to use jquery. If you want to use the default prototype library, delete the jquery links from the head section of the application layout and uncomment “javascript_include_tag :defaults”.
I have added two scripts. One for fading out flash notices/errors and another that provides hint text for form fields.

Helpers

I have included form_style_helper in the helpers folder. This helper in conjunction with CSS helps you customize your forms. More info can be found on github.

HTML/CSS

A basic (single column with header and footer) application layout file is included. A basic CSS file is included, titled ‘one.css’.

About

Cortex_Engine is a rails (2.3.8) base setup that includes eveything you need to get started on a new ruby on rails project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published