forked from codeforamerica/honolulu_answers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[codeforamerica#18] Style, format fixes for models
- Loading branch information
Philip Hale
committed
Sep 1, 2013
1 parent
c6f74a5
commit ec71b42
Showing
8 changed files
with
32 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
class Administrator < ActiveRecord::Base | ||
# Include default devise modules. Others available are: | ||
# :token_authenticatable, :encryptable, :confirmable, and :omniauthable | ||
devise :database_authenticatable, :lockable, :timeoutable, :recoverable, :trackable #, :registerable, :validatable, :rememberable | ||
|
||
# Setup accessible (or protected) attributes for your model | ||
attr_accessible :email, :password, :password_confirmation#, :remember_me | ||
# attr_accessible :title, :body | ||
devise :database_authenticatable, :lockable, :timeoutable, :recoverable, :trackable | ||
attr_accessible :email, :password, :password_confirmation | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
class Guide < Article | ||
include TankerArticleDefaults | ||
include TankerArticleDefaults | ||
|
||
has_many :guide_steps | ||
has_many :guide_steps | ||
|
||
tankit do | ||
indexes :guide_steps_content do | ||
guide_steps.map { |gs| gs.content } | ||
end | ||
indexes :guide_steps_title do | ||
guide_steps.map { |gs| gs.title } | ||
end | ||
tankit do | ||
indexes :guide_steps_content do | ||
guide_steps.map { |gs| gs.content } | ||
end | ||
indexes :guide_steps_title do | ||
guide_steps.map { |gs| gs.title } | ||
end | ||
end | ||
|
||
|
||
def guide_steps | ||
GuideStep.where("article_id = #{self.id}").order("step") | ||
end | ||
end | ||
def guide_steps | ||
GuideStep.where("article_id = #{self.id}").order("step") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class GuideStep < ActiveRecord::Base | ||
include TankerArticleDefaults | ||
belongs_to :guide, :class_name => 'Guide', :foreign_key => 'article_id' | ||
attr_accessible :article_id, :title, :content, :preview, :step | ||
include TankerArticleDefaults | ||
belongs_to :guide, :class_name => 'Guide', :foreign_key => 'article_id' | ||
attr_accessible :article_id, :title, :content, :preview, :step | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
class QuickAnswer < Article | ||
include TankerArticleDefaults | ||
end | ||
include TankerArticleDefaults | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class WebService < Article | ||
include TankerArticleDefaults | ||
include TankerArticleDefaults | ||
|
||
attr_accessible :service_url | ||
attr_accessible :service_url | ||
|
||
end | ||
end |