Skip to content

satyapriya/Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • rvm use 1.9.3@rails_3.2.9

  • rails new assignment_satya

  • cd assignment_satya

  • rails g scaffold question question_info:text difficulty importance:integer time_to_solve:integer status

  • edit the migration for default values

  • rake db:migrate

  • add validations to the model

  • add the necessary gems to the gem file

-

         source 'https://rubygems.org'

         gem 'rails', '3.2.11'

         # Bundle edge Rails instead:
         # gem 'rails', :git => 'git://github.com/rails/rails.git'

         gem 'sqlite3'

         # Gems used only for assets and not required
         # in production environments by default.
         group :assets do
           gem 'sass-rails',   '~> 3.2.3'
           gem 'coffee-rails', '~> 3.2.1'

           # See https://github.com/sstephenson/execjs#readme for more supported runtimes
           # gem 'therubyracer', :platforms => :ruby

           gem 'uglifier', '>= 1.0.3'
           gem "therubyracer"
           gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
           gem "twitter-bootstrap-rails"
           gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
           gem 'jquery-ui-rails'
         end

         gem 'will_paginate'
         gem 'jquery-rails'

         # To use ActiveModel has_secure_password
         # gem 'bcrypt-ruby', '~> 3.0.0'

         # To use Jbuilder templates for JSON
         # gem 'jbuilder'

         # Use unicorn as the app server
         # gem 'unicorn'

         # Deploy with Capistrano
         # gem 'capistrano'

         # To use debugger
         # gem 'debugger'
- bundle install
  • validate :difficulty, :importance, :question_info, :status, :time_to_solve ,:presence=>true

    t.text :question_info
    t.string :difficulty,:default=> 'L'
    t.integer :importance,:default=>10
    t.time :time_to_solve
    t.string :status,:default=> "Active"
    
  • After running bundle install, run the generator:

    rails generate bootstrap:install static
  • install twitter bootstrap

    rails g bootstrap:layout application fixed
  • Apply bootstrap theme to ur crud

  • rails g bootstrap:themed questions

About

Assignment info

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published