Skip to content

nagraju/School-Project

Repository files navigation

== Welcome to Rails

Rails is a web-application framework that includes everything needed to create 
database-backed web applications according to the Model-View-Control pattern. 

This pattern splits the view (also called the presentation) into "dumb" templates
that are primarily responsible for inserting pre-built data in between HTML tags.
The model contains the "smart" domain objects (such as Account, Product, Person,
Post) that holds all the business logic and knows how to persist themselves to
a database. The controller handles the incoming requests (such as Save New Account,
Update Product, Show Post) by manipulating the model and directing data to the view.

In Rails, the model is handled by what's called an object-relational mapping
layer entitled Active Record. This layer allows you to present the data from
database rows as objects and embellish these data objects with business logic
methods. You can read more about Active Record in
link:files/vendor/rails/activerecord/README.html.

The controller and view are handled by the Action Pack, which handles both
layers by its two parts: Action View and Action Controller. These two layers
are bundled in a single package due to their heavy interdependence. This is
unlike the relationship between the Active Record and Action Pack that is much
more separate. Each of these packages can be used independently outside of
Rails.  You can read more about Action Pack in
link:files/vendor/rails/actionpack/README.html.


== Getting Started (with starter_app)

1. In the terminal (might take some time):
    
    ./script/setup
    
2. Then, start the server:
    
    ./script/server


== Console

You can interact with the domain model by starting the console through <tt>script/console</tt>.
Here you'll have all parts of the application configured, just like it is when the
application is running. You can inspect domain models, change values, and save to the
database. Starting the script without arguments will launch it in the development environment.
Passing an argument will specify a different environment, like <tt>script/console production</tt>.

To reload your controllers and models after launching the console run <tt>reload!</tt>

== dbconsole

You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
You would be connected to the database with the credentials defined in database.yml.
Starting the script without arguments will connect you to the development database. Passing an
argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
Currently works for mysql, postgresql and sqlite.


== Description of Contents

app
  Holds all the code that's specific to this particular application.

app/controllers
  Holds controllers that should be named like weblogs_controller.rb for
  automated URL mapping. All controllers should descend from ApplicationController
  which itself descends from ActionController::Base.

app/models
  Holds models that should be named like post.rb.
  Most models will descend from ActiveRecord::Base.

app/views
  Holds the template files for the view that should be named like
  weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
  syntax.

app/views/layouts
  Holds the template files for layouts to be used with views. This models the common
  header/footer method of wrapping views. In your views, define a layout using the
  <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb,
  call <% yield %> to render the view using this layout.

app/helpers
  Holds view helpers that should be named like weblogs_helper.rb. These are generated
  for you automatically when using script/generate for controllers. Helpers can be used to
  wrap functionality for your views into methods.

config
  Configuration files for the Rails environment, the routing map, the database, and other dependencies.

db
  Contains the database schema in schema.rb.  db/migrate contains all
  the sequence of Migrations for your schema.

doc
  This directory is where your application documentation will be stored when generated
  using <tt>rake doc:app</tt>

lib
  Application specific libraries. Basically, any kind of custom code that doesn't
  belong under controllers, models, or helpers. This directory is in the load path.

public
  The directory available for the web server. Contains subdirectories for images, stylesheets,
  and javascripts. Also contains the dispatchers and the default HTML files. This should be
  set as the DOCUMENT_ROOT of your web server.

script
  Helper scripts for automation and generation.

test
  Unit and functional tests along with fixtures. When using the script/generate scripts, template
  test files will be generated for you and placed in this directory.

vendor
  External libraries that the application depends on. Also includes the plugins subdirectory.
  If the app has frozen rails, those gems also go here, under vendor/rails/.
  This directory is in the load path.
  
  
== Article Resources

Patch Rails
  http://accidentaltechnologist.com/ruby/patching-ruby-on-rails-refresher/
  
Remove Git Submodule
  http://www.hackido.com/2009/01/quick-tip-remove-git-submodule.html
  
Black Box Testing
  http://www.mendable.com/rails-black-box-testing-complex-models/
  
Database Indexing
  http://robots.thoughtbot.com/post/163627511/a-grand-piano-for-your-violin
  
API Protection & Analytics
  http://apigee.com/
  
Metaprogramming Toolbox (for plugins)
  http://weare.buildingsky.net/2009/08/25/rubys-metaprogramming-toolbox
  
Database Query/Memory Optimization
  http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/
  
Security
  http://www.tonyamoyal.com/2009/08/04/defending-against-attacks-with-rails/
  
== Default jQuery/JavaScript Extensions

jquery-ui
  http://jqueryui.com/
  
jquery.tools
  http://flowplayer.org/tools
  
pop menu
  http://github.com/seaofclouds/pop
  
textfield grow
  http://www.unwrongest.com/projects/elastic/
  
textfield limit
  http://www.unwrongest.com/projects/limit/
  
dynamic timestamps
  http://github.com/rmm5t/jquery-timeago
  
tooltip
  http://craigsworks.com/projects/qtip
  
image loading
  http://github.com/tuupola/jquery_lazyload
  
text hyphenator
  http://code.google.com/p/hyphenator/
  
text truncator
  http://github.com/derrick/jquery.truncator.js
  
  
== Useful Sites/Tools

Hurl - API testing/debugging
  http://hurl.r09.railsrumble.com


== Default Rails Extensions (gems/plugins)

See:
  config/enviroment.rb
  config/environments/cucumber.rb
  config/environments/development.rb
  config/environments/test.rb
  config/environments/production.rb
  vendor/plugins/...
  
authorization
  http://github.com/stffn/declarative_authorization
  
model attribute defaults
  http://github.com/rubaidh/default_values
  
subdomains
  http://github.com/mbleigh/subdomain-fu
  
  
== Useful JavaScript Extensions

google analytics
  http://github.com/christianhellsten/jquery-google-analytics
  
star-rating
  http://github.com/raskchanky/star-rating
  
round corners
  http://github.com/weepy/cornerz
  http://www.ruzee.com/content/liquid-canvas
  
table sort/filter
  http://tablesorter.com
  http://github.com/jbritten/jquery-tablesorter-filter
  
client-side search
  http://rikrikrik.com/jquery/quicksearch
  
keyboard shortcuts
  http://rikrikrik.com/jquery/shortkeys/
  
text replacement
  http://github.com/sorccu/cufon (canvas/VML)
  http://wiki.novemberborn.net/sifr3 (flash)
  
google maps
  http://code.google.com/p/jmaps
  
svg
  http://github.com/DmitryBaranovskiy/raphael
  
feature detection
  http://modernizr.com (html5)
  
file select styling (browser-support)
  http://www.appelsiini.net/projects/filestyle
  
form validation
  http://www.unwrongest.com/projects/valid8/
  
  
== Useful Rails Extensions (gems/plugins)

DRYing up views
  http://github.com/apotonick/cells
  
attribute normalization
  http://github.com/mdeering/attribute_normalizer
  
searching
  http://github.com/thoughtbot/squirrel (search query DSL #1)
  http://github.com/binarylogic/searchlogic (search query DSL #2)
  http://github.com/freelancing-god/thinking-sphinx (full-text search - sphinx)
  http://github.com/outoftime/sunspot (full-text search - solr)
  
table-less models
  http://github.com/kennethkalmer/activerecord-tableless-models
  http://github.com/cherring/activerecord-tableless (new - and more maintained)
  
feeds
  http://github.com/grosser/acts_as_feed
  
api
  http://github.com/quantipay/authlogic_haapi (http authentication with api key)
  
state machine
  http://github.com/pluginaweek/state_machine
  
model tagging
  http://github.com/mbleigh/acts-as-taggable-on
  
model categorization
  http://github.com/funkensturm/acts_as_category
  
model recommendation
  http://github.com/maccman/acts_as_recommendable
  http://github.com/wolframarnold/acts_as_most_popular
  
file attachments
  http://github.com/thoughtbot/paperclip
  
activity feed
  http://github.com/TheBreeze/shadow (straightforward)
  http://github.com/giraffesoft/timeline_fu (general solution)
  
localization (extended)
  http://github.com/janne/model_translations
  http://github.com/josevalim/localized_templates
  http://github.com/raul/translate_routes
  
money/currency
  http://github.com/FooBarWidget/money
  
model deletion
  http://github.com/semanticart/is_paranoid (same table, hidden)
  http://github.com/ajh/acts_as_soft_deletable (own table)
  
graphs
  http://github.com/pullmonkey/open_flash_chart (flash)
  http://github.com/cdunn/has_activity (activity charts)
  
activerecord optimization
  http://github.com/nkallen/cache-money (memcached)
  http://github.com/methodmissing/scrooge (query optimization)
  http://github.com/dsboulder/query_reviewer (currently only mysql)
  http://github.com/eladmeidar/rails_indexes (track down missing database indexes)
  
auto complete
  http://github.com/chris/auto_complete_jquery
  http://github.com/evilmarty/jrails_auto_complete
  
infinite page
  http://github.com/Ouziel/infinite_page (pagination extension)
  
in-place editing
  http://github.com/rubymood/jintastic
  
navigation
  http://github.com/andi/simple-navigation
  
embed flash
  http://github.com/marcandre/swf_fu
  
ajax file uploads
  http://github.com/adamlogic/jaxy_file_uploads
  http://uploadify.com/
  
html generating/building
  http://github.com/judofyr/parkaby
  
load testing
  http://github.com/giraffesoft/trample
  
database backup
  http://github.com/gravelpup/backup_fu (simple)
  http://github.com/astrails/safe (advanced + flexible)
  
active_record versioning
  http://github.com/laserlemon/vestal_versions
  
A/B-testing
  http://www.bingocardcreator.com/abingo/
  
speed-up rspec/cucumber
  http://github.com/timcharper/spork
  
friends/network
  http://github.com/sjlombardo/acts_as_network
  
activity feed
  http://github.com/face/activity_streams
  
== Other

rdoc browser
  http://github.com/manalang/bdoc
  

About

Move along, nothing to see here...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published