mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-10 06:32:36 +01:00
start modifying done view and do some refactoring
This commit is contained in:
parent
de7b8e329d
commit
01057af684
19 changed files with 160 additions and 202 deletions
|
|
@ -19,6 +19,7 @@ class Context < ActiveRecord::Base
|
|||
validates_does_not_contain :name, :string => ',', :message => "cannot contain the comma (',') character"
|
||||
|
||||
def self.feed_options(user)
|
||||
# TODO: move to view or helper
|
||||
{
|
||||
:title => 'Tracks Contexts',
|
||||
:description => "Lists all the contexts for #{user.display_name}"
|
||||
|
|
@ -36,14 +37,7 @@ class Context < ActiveRecord::Base
|
|||
def title
|
||||
name
|
||||
end
|
||||
|
||||
def summary(undone_todo_count)
|
||||
s = "<p>#{undone_todo_count}. "
|
||||
s += "Context is #{hidden? ? 'Hidden' : 'Active'}."
|
||||
s += "</p>"
|
||||
s
|
||||
end
|
||||
|
||||
|
||||
def new_record_before_save?
|
||||
@new_record_before_save
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue