Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Commit

Permalink
Slight tidy-up
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Dec 17, 2013
1 parent 1ede739 commit 826c42b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions README.md
@@ -1,18 +1,20 @@
# opal-todos

**not finished yet**

A very simple port of [TodoMVC](http://todomvc.com) (specifically based on backbone version).

## Running

Get dependencies:

$ bundle install
```
$ bundle install
```

Run the sprockets based server for auto-compiling:

$ bundle exec rackup
```
$ bundle exec rackup
```

Open `http://localhost:9292` in the browser.

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions app/models/todo.rb
Expand Up @@ -5,6 +5,8 @@ class Todo < Vienna::Model

attributes :title, :completed

alias completed? completed

# All active (not completed) todos
def self.active
all.reject(&:completed)
Expand Down
2 changes: 1 addition & 1 deletion app/views/todo_view.rb
Expand Up @@ -36,7 +36,7 @@ def apply_filter(filter)
end

def hidden?(filter)
completed = @todo.completed
completed = @todo.completed?

!completed && filter == 'completed' or completed && filter == 'active'
end
Expand Down
2 changes: 1 addition & 1 deletion config.ru
Expand Up @@ -7,5 +7,5 @@ run Opal::Server.new { |s|

s.index_path = 'index.html.erb'
s.debug = true
s.main = 'app'
s.main = 'application'
}
2 changes: 1 addition & 1 deletion index.html.erb
Expand Up @@ -6,7 +6,7 @@
<title>opal-todos • TodoMVC</title>

<link rel="stylesheet" href="/vendor/base.css">
<%= javascript_include_tag 'app' %>
<%= javascript_include_tag 'application' %>
</head>
<body>
<section id="todoapp">
Expand Down

0 comments on commit 826c42b

Please sign in to comment.