Преглед изворни кода

Add ActiveRecord subclassing

master
Adrian Short пре 11 година
родитељ
комит
f5a0f586c7
3 измењених фајлова са 3 додато и 3 уклоњено
  1. +1
    -1
      app/models/feed.rb
  2. +1
    -1
      app/models/post.rb
  3. +1
    -1
      app/models/user.rb

+ 1
- 1
app/models/feed.rb Прегледај датотеку

@@ -1,4 +1,4 @@
class Feed
class Feed < ActiveRecord::Base
has_many :posts, :dependent => :destroy

validates :title, :presence => true


+ 1
- 1
app/models/post.rb Прегледај датотеку

@@ -1,4 +1,4 @@
class Post
class Post < ActiveRecord::Base
belongs_to :feed
EARTH_RADIUS_M = 6378000


+ 1
- 1
app/models/user.rb Прегледај датотеку

@@ -1,4 +1,4 @@
class User
class User < ActiveRecord::Base
authenticates_with_sorcery!
# attr_accessible :email, :password, :password_confirmation



Loading…
Откажи
Сачувај