Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

ruby on rails nifty generators #168

Open
aniketshivamtiwari opened this issue Oct 30, 2015 · 0 comments
Open

ruby on rails nifty generators #168

aniketshivamtiwari opened this issue Oct 30, 2015 · 0 comments

Comments

@aniketshivamtiwari
Copy link

my gem file
gem 'rails', '4.2.4'
gem 'mysql2','> 0.3.20'
gem 'sass-rails', '
> 5.0'
gem 'devise'
gem "nifty-generators", :group => :development
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '
> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

migrations
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table(:users) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""

  ## Recoverable
  t.string   :reset_password_token
  t.datetime :reset_password_sent_at

  ## Rememberable
  t.datetime :remember_created_at

  ## Trackable
  t.integer  :sign_in_count, default: 0, null: false
  t.datetime :current_sign_in_at
  t.datetime :last_sign_in_at
  t.string   :current_sign_in_ip
  t.string   :last_sign_in_ip
  t.string :name

t.timestamps null: false
end

add_index :users, :email,                unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token,   unique: true
# add_index :users, :unlock_token,         unique: true

end
end
my model
class User < ActiveRecord::Base

Include default devise modules. Others available are:

:confirmable, :lockable, :timeoutable and :omniauthable

devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
validates :email, :presence => true, :uniqueness => true
my routes file
Rails.application.routes.draw do
devise_for :users
root :to => "home#index"
end
my controller
class HomeController < ApplicationController

def index

end
end

my view

hellow to index

end
I am following this tutorial
http://code.tutsplus.com/tutorials/build-a-dropbox-like-file-sharing-site-with-ruby-on-rails--net-17940
but nifty layout is not working..i need to know whether it works with rails 4.2.2 or not if not then what is the solution

@aniketshivamtiwari aniketshivamtiwari changed the title ruby on rails nufty generators ruby on rails nifty generators Oct 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant